-
1. Re: Monson-Haefel example - Client_1
sebaseba May 2, 2002 10:12 AM (in response to deanp)Which thread do you mean?
Sound like a classpath issue, but you probably already guessed that much :-)
/Sebastian -
2. Re: Monson-Haefel example - Client_1
saint1 May 2, 2002 10:21 AM (in response to deanp)You must look at "CabinBean" :-)
jndiContext.lookup("CabinBean")
hope it works. You should look in documentation of JBOSS there is a describtion of that. You need a jboss.xml file
where you specify the reference between your EntityBean and the SessionBean.
Pierre -
3. Re: Monson-Haefel example - Client_1
deanp May 3, 2002 1:49 AM (in response to deanp)Mmmm - still no luck...
the call I am making TravelAgentBean is...
Context jndiContext = new InitialContext();
Object obj = jndiContext.lookup("java:comp/env/ejb/CabinHome");
In the ejb-jar.xml file we have...
...
<ejb-ref>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
com.titan.cabin.CabinHome
com.titan.cabin.Cabin
</ejb-ref>
...
and the jboss.xml file looks like:
<enterprise-beans>
<ejb-name>TravelAgentBean</ejb-name>
<ejb-ref>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<jndi-name>CabinBean</jndi-name>
</ejb-ref>
</enterprise-beans>
Now - I assume that the TravelAgentBean looks for "ejb/CabinHome" from ejb-jar.xml (which is then mapped to CabinBean by jboss.xml) and then looks for the com.titan.cabin.CabinHome class - which is where it fails...
Do I need to set a CLASSPATH? or some kind of classpath extension in a configuration file?
Oh - Thanks for the suggestions so far...help is much appreciated.
Thanks,
Dean -
4. Re: Monson-Haefel example - Client_1
saint1 May 3, 2002 5:32 PM (in response to deanp)You must put the Cabin classes into your Travelagent.jar.
Pierre -
5. Re: Monson-Haefel example - Client_1
deanp May 5, 2002 12:19 AM (in response to deanp)Thanks Pierre - that worked!
Is putting the Cabin Bean classes used by the TravelAgent Bean standard for EJB development/deployment or is it a particular aspect of JBoss? -
6. Re: Monson-Haefel example - Client_1
saint1 May 6, 2002 6:06 AM (in response to deanp)I havnt worked with other containers. I think it is a paticular aspect of jboss.
regards Pierre