开发者

Glassfish servlet and EJB bean dependency

开发者 https://www.devze.com 2023-03-25 15:40 出处:网络
I am using Glassfish 3.1.1 and trying to get EJB2.x deployment working before moving to EJB3. I have made a small example that is structured like this:

I am using Glassfish 3.1.1 and trying to get EJB2.x deployment working before moving to EJB3. I have made a small example that is structured like this:

  • EAR
    • A.jar
      • ejb-jar.xml to describe bean A, containing the remote and local interfaces.
      • the bean also contains a helper class to narrow() the home interface object.
    • B.jar
      • ejb-jar.xml to describe bean B, containing the remote and local interfaces.
      • the bean also contains a helper class to narrow() the home interface object.
    • C.war
      • web.xml contains a servlet and <ejb-local-ref> tags to point to local interface of beans A and B
      • war contains code to perform lookup of the local interface and narrow it using the helper class of the bean.

This all deploys and works fine. But when I want to move the lookup code out of the war and move it to a jar that is available under the lib/helper.jar I get a ClassNotFoundException on the narrow helper.

Caused by: java.lang.ClassNotFoundException: com.abeloos.glassfish.helper.narrow.calculator.EJBNarrow at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:808) at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)

开发者_如何学Python

It is almost as if you cannot access the bean code if you come from the lib-path.

0

精彩评论

暂无评论...
验证码 换一张
取 消