Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Pass data from servlet to EJB3 and backward

843830Jun 16 2009 — edited Jun 17 2009
Hello All,

The distributed application is being developed by the following scheme:
J2EE Application Server (JBoss) - Servlet container (JBoss's contained Tomcat) - RIA client (Flex)

Application server needs to handle client's requests and provide backward connectivity also.
Servlets in this scheme are required by the BlazeDS library which is implemented as set of servlets handling HTTP requests from the clients.

This forces us to:
- invoke EJB from the servlet while handling client's requests.
- invoke servlet from EJB for the sake of providing the client with urgent messages which need to be displayed immediately.

The easiest ways to achieve that I am aware of are:
- servlet invokes EJB via JNDI lookup (inefficient?)
- EJB invokes servlet by passing HTTP request to web server (inefficient!)

Is there standard and efficient ways to wire servlets(JSP) and EJB in either directions?

Thanks,
Alex.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2009
Added on Jun 16 2009
6 comments
169 views