Pass data from servlet to EJB3 and backward
843830Jun 16 2009 — edited Jun 17 2009Hello 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.