JBoss definitely supports the java:comp/env/ namespace.  It's only used
within EJBs for them to refer to server resources (other EJBs, datasources,
etc.)  You are probably not completely specifying your deployment
descriptors.  In JBoss, you need both the standard ejb-jar.xml and the
JBoss-specific jboss.xml.  If EJB A is referring to EJB B, the ejb-jar.xml
should have an entry like this:

         <ejb-ref>
            <ejb-ref-name>ejb/guyr/ejbB</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <home>guyr.ejbBHome</home>
            <remote>guyr.ejbB</remote>
         </ejb-ref>

and a jboss.xml entry like this:

      <ejb-ref>
         <ejb-ref-name>ejb/guyr/ejbB</ejb-ref-name>
         <jndi-name>guyr/ejbB</jndi-name>
      </ejb-ref>


----- Original Message -----
From: "Mikhail Akopov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 6:17 PM
Subject: [JBoss-user] JNDI java: namespace


> trying to execute junitEE example under jBoss I found a problem.
> beans are searched there in a such way:
>       Object ref = jndiContext.lookup("java:comp/env/ejb/EinsteinEJB");
> but nothing works up to moment I edit sources to
>       Object ref = jndiContext.lookup("EinsteinEJB");
>
> I found that jBoss documentation says that jBoss doesn't support
> 'java:comp/env'
> The same problem I found naming mySQL datasource.
>
> I tried to fix a problem by adding appropriate jBoss.xml to jars but
nothing
> changed.
>
> Sorry for a stupid question, but should  I edit all the EJB sources to
make
> them suitable to jBoss? What is my error?
>
> Vale! - Mikhail Akopov
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to