my dog learned polymorphism*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Session EJB acting as delegate" Watch "Session EJB acting as delegate" New topic
Author

Session EJB acting as delegate

Jaiom Rana
Greenhorn

Joined: Jul 03, 2003
Posts: 5
Hello,
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?
Regards,
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.
 
jQuery in Action, 2nd edition
 
subject: Session EJB acting as delegate
 
Similar Threads
Business Logic in EJB3 SessionBean?
Implementing Hibernate on legacy system
pojo into ejb & web services
Entity beans are shared data?
How to obfuscate a j2ee application