Deploying EJB application
Hi,
We are developing an Enterprise application, using JSP pages, Servlets and EJBs. All EJB development is handled by one developer and I do the web tier development (JSPs, Servlets and other required Java classes). We are using Oracle Container for J2EE (OC4J) and having problems accessing the EJBs from the web application if I deploy them separately. The question is - should we deploy the EJBs and Web application together? What is the best practice?
Deploying together takes a lot of time, that is why I want to avoid it.
I appreciate your help.
Giri.
[590 byte] By [
giri19a] at [2007-9-19]

The most accepted practice is to deploy it as an ear file. Unfortunately, the classloader standard does not make them like DLL's. That is, if the EJB changes, you have to update each application / ear file. It's dumb, but that's the way it is.
Another method, which can be more simple depending on your environment is to include that ejb/jar within your war files (in the web-inf/lib) directory and deploy it on the server as an EJB. Again, all applications have to be updated if the ejb is changed.
The only way I know of to avoid this is to put the EJB within your classpath. Then it doesn't need be included in all your projects nor installed as an EJB on your server. However, whenever it gets updated the server will have to be restarted.
Hope this helps.
~hayedid