wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes can't resolve SLSB from local webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "can Watch "can New topic
Author

can't resolve SLSB from local webapp

Marc Marc
Greenhorn

Joined: Oct 11, 2007
Posts: 2
I am having trouble to resolve the SLSB (EJB3) on the web-client (running on the same VM inside the same EAR) on JBoss AS 4.2.1:

ImportManager (local IF)
ImportManagerBean (SLSB impl)

jboss-web.xml
<jboss-web>
<ejb-local-ref>
<ejb-ref-name>ejb/ImportManagerBean</ejb-ref-name>
<local-jndi-name>ImportManager</local-jndi-name>
</ejb-local-ref>
</jboss-web>

web.xml
<ejb-local-ref>
<ejb-ref-name>ejb/ImportManagerBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>mypackage.ImportManager</local-home>
mypackage.ImportManager
<ejb-link>ImportManager</ejb-link>
</ejb-local-ref>

--> the Bean/local IF should now be available in JNDI-ctx "ImportManager"
context.lookup("ImportManager");
but it IS NOT !

The ear is deployed successfully.
I understand that this trouble is due to a "conflict" between JEE5 (EJB3) and JEE1.4 (Servlet 2.4) in this JBoss-version. But there should be some solution to this.

Any hint to solve this is appreciated.
Marc Marc
Greenhorn

Joined: Oct 11, 2007
Posts: 2
the web.xml has a small typo. it should look like this:

<ejb-local-ref>
<ejb-ref-name>ejb/ImportManagerBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>mypkg.ImportManager</local-home>
<local>mypkg.ImportManager</local>
<ejb-link>ImportManager</ejb-link>
</ejb-local-ref>
[ October 11, 2007: Message edited by: Marc Marc ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: can't resolve SLSB from local webapp
 
Similar Threads
Referencing EJBs in a JAR file from a WAR
SB has problem looking up the EB via JNDI.
why to use jboss.xml ?????
Not able to excute EJB ClassCastException
unresolved ejb-link