in the web.xml <ejb-local-ref> <ejb-ref-name>ejb/SessionEJB</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local-home>ejb.SessionEJBLocalHome</local-home> <local>ejb.SessionEJBLocal</local> <ejb-link>SessionEJB</ejb-link> </ejb-local-ref>
the web app and ejb are in separate jaf files (war and jar, not packaged up in ear)....
When I deploy the Web App, it keeps complaining:
weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'SessionEJB' declared in the ejb-ref or ejb-local-ref 'ejb/SessionEJB' in the application module 'sessio Test.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.]
The reason why it doesn't work when you deploy war and jar separately (as opposed to deploying withinn the same ear file) is due to the way WebLogic has its classloader hierarchy. Heres a link which tells you more:
Originally posted by Ernest Lee: How does classloader effect EJB lookup?
Well, for one the J2EE Specification mandates that components should only be able to access local ejbs that are packaged in the same ear. Therefore, if you want to access your local ejbs from your war then you must package them together in an ear deployment.
Most problems that people have with J2EE packaging and deployment are related directly to classloading. In fact, many problems that people have with Java in general are related to classloading. So yes, classloaders definitely play a big role in J2EE.
Yes, my master! Here is the tiny ad you asked for:
SKIP - a book about connecting industrious people with elderly land owners