cancel
Showing results for 
Search instead for 
Did you mean: 

Rewriting my WDJ project using J2EE EJB's

Former Member
0 Kudos

Greetings, experts.

I have constructed a Web Dynpro project which I am now converting to EAR, because it must run as an automated job via the portal Java Scheduler. It is a simple application that will read portal server tables, extract rows using SQL and JDBC, and then iterate through these rows, calling an R/3 RFC for each to read HR information (e-mail address) for the user ID in the result set. Finally, an e-mail is created and sent via simple SMTP. Very low volume application, intended to run daily during off hours. My application logic is complete, everything works great in my WDJ DC. Now to move everything to non-WebDynpro Java.

My skill set is specific to WDJ. I am new to J2EE development, and I am struggling with the mechanics of the EJB. So far, I have made the following correlations (specifically for my current task, not broadly accurate)

Message driven bean =  Application (because it is the Java Scheduler launch trigger, no problem here, this works great)

Session bean = component controller, business logic (methods, data declarations, import classes, etc....)

Entity bean = Model? Context? I need help here. I have tried to summarize my questions into these two:

Q. What is the J2EE functional equivalent of a component controller context node? Is it an entity bean, and do I need to use a dictionary project and/or a JPA project? In my WDJ application, I read the SQL result set into a design time defined context node, with elements corresponding to the returned data fields. It shouldn't be a difficult task, but I am inexperienced, and I keep getting hung up on persistence, stateful-ness, and data dictionary projects. Do I need them?

Q. From what I can tell, RFC models were easier to manage before the SAP Enterprise Connector became deprecated. The actual function module execution couldn't be more simplistic - it takes a single string as input and returns two other strings. I am making this call frequently, once per record, but I do not need to retain the output data set from one call to the next, so constructing a complete model seems like overkill.

Composition Environment makes my head spin, I feel that the learning curve is too steep for this quick little project. And I know someone is going to recommend web services, I don't have that skill set, either, but I am not opposed to trying. I get the impression that managing the model is the hard part, and web service enabling it is simple, once you know how. I've done my diligence, scouring forums and online resources, reading books, and I've come a long way on my own.

I feel like the answer is just beyond my fingertips, can someone please help me bridge those last few inches?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

And, if anyone is wondering, YES this is the project I was initiating at the time of my earlier post .

I really REALLY didn't need Environmental Compliance source code, after all. 

Former Member
0 Kudos

Update: The first question in my initial post has been answered. I am still looking for guidance with the second question about performing a very simple RFC/BAPI call from my portal deployed EJB to our R/3 ECC system, most likely using a jCo connection, with a minimum level of complexity and overhead.

My call will be passing a single text parameter and receiving back two text fields, and will be executed three times per record processed. Sounds like a bad idea performance-wise, I know, but again, this is a very low volume off-hours batch job, and there are reasons for doing it this way.

Thank you for taking time to read my posts!

Former Member
0 Kudos

Quick question - if I have decided to use SAPJco3, do I have to create a connector project, or can I just put all my logic in a session bean of my EJB project?

junwu
Active Contributor
0 Kudos

you can write your jco code in ejb

Answers (0)