File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Session EJB acting as delegate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Session EJB acting as delegate" Watch "Session EJB acting as delegate" New topic

Session EJB acting as delegate

Jaiom Rana

Joined: Jul 03, 2003
Posts: 5
We are using struts framework where for every screen we have a form bean, which calls action class, which inturn calls session ejb(stateless). The business logic is in session ejb which use DAO to interact with database.
Now the problem is, that in current scenerio, we will end-up having 100+ screens and thus 100+ session ejb, which may create performance problem later. Pls suggest.
Also, can we modify the current framework to look like something.....that we build few session ejbs(categorized based on modules), which will have methods for their related screens, which will inturn invoke a normal java class (with business logic) and this java class will call DAO to interact with database. Pls note that every call to ejb will require TRANSACTION.
Pls suggest the pros and cons of this approach or is there a better way to deal with such scenerio?
Jaiom Rana
Nagendra Prasad
Ranch Hand

Joined: Jul 11, 2002
Posts: 219
I have recently looked into this, found one reference of doing it.
Check out the 'WebSphere Command Pattern'. Details of this are available in the IBM Redbook:
sg245754 Design and Implement Servlets, JSPs, and EJBs for WebSphere.pdf
I hope this would give you the details u are looking for.
The basic idea of the whole thing is to decouple ur front end from having to know everything abt the backend ( ur business specific session ejb's).
Hope this helps.

Best Regards,<br />Nagendra Prasad.
I agree. Here's the link:
subject: Session EJB acting as delegate
It's not a secret anymore!