-
1. Re: problems when reference external jar deployed on same ap
adrian.brock Mar 4, 2002 8:52 AM (in response to kometen)Does it really say CabinJEB in jboss.xml ?
Regards,
Adrian -
2. Re: problems when reference external jar deployed on same ap
kometen Mar 4, 2002 9:35 AM (in response to kometen)Sorry, typo. Had problems pasting. It is CabinEJB.
-
3. Re: problems when reference external jar deployed on same ap
adrian.brock Mar 4, 2002 10:06 AM (in response to kometen)You might want to compare your example with this one.
http://www.jboss.org/online-manual/HTML/ch07s13.html
Regards,
Adrian -
4. Re: problems when reference external jar deployed on same ap
kometen Mar 4, 2002 12:45 PM (in response to kometen)Thank you for the link. I had already tried the suggestions outlined in section 'External EJB ref.' some time ago, but I'm not shure whether I got the URL correct. The syntax says <jndi-name>jnp://otherserver/application/beanB</jndi-name>.
So otherserver must be localhost in my case.
But what does application refer to exactly? I assumed that it was the name of the applications deployed, eg. cabin (from cabin.jar) or travelagent. Is this a correct assumption?
regards
Claus -
5. Re: problems when reference external jar deployed on same ap
adrian.brock Mar 4, 2002 1:46 PM (in response to kometen)It is a naming convention to avoid conflicts.
This part of the config gets very confusing, especially
when everything has the same name.
I've probably got the example below wrong :-)
In your example this convention would be:
[pre]
<ejb-name>CabinEJB</ejb-name>
<jndi-name>travelApp/ejbs/CabinEJB</jndi-name>
...
<ejb-name>TravelAgentEJB</ejb-name>
<jndi-name>travelApp/ejbs/TravelAgentEJB</jndi-name>
<ejb-ref>
<ejb-ref-name>ejb/CabinEJB</ejb-ref-name>
<jndi-name>travelApp/ejbs/CabinEJB</jndi-name>
</ejb-ref>
</ejb-name>
[/pre]
In English, the travel agent bean has the address
travelApp/ejbs/TravelAgentEJB
it uses the bean at
travelApp/ejbs/CabinEJB
calling it the short name
ejb/CabinEJB
Regards,
Adrian -
6. Re: problems when reference external jar deployed on same ap
kometen Mar 7, 2002 6:04 AM (in response to kometen)Dear Adrian.
Thank you very much for your quick answers. I upgraded to the latest cvs-version as of March the 7'th. and compiled it successfully. I re-deployed my cabin- and travelagent.jar's and was able to make a b2b-communication.
It turned out that the code I copied from the book all-ready conformed to EJB 2.0 standard, but jboss 2.4.4 did not support CMP 2.0 as you stated.
The code in the book and the online-doc is sufficient to successfully deploy the beans.
The doc reg. Mr. Monson-Haefels cabin-example is found at http://jboss.org/online-manual/HTML/ch14.html#d0e12038.
It is not neccessary though to include the Cabin*.class-files to the travelagent.jar. But this may have historical reasons why this is done this way.
best regards
Claus -
7. Re: problems when reference external jar deployed on same ap
fsyu Apr 23, 2002 8:21 PM (in response to kometen)Hi,
I have a quick question about deploying the TravelAgentBean.
I have following the previous post and successfully run the Client_1 and Client_2 without problem. After I deploy the the TravelAgent as a separate jar file, I got an exception
java.lang.ClassNotFoundException: com.titan.cain.CabinHomeRemote
I don't see the "Nested ..." excepiton as before. Then, I try to put my cabin.jar to the deploy folder, jar it together with the travelAgent.jar, ... But, it still give me the same error. (In the mean time, the Client_1, Client_2 are all working fine.)
Do I need to put the Cabin.jar in some specific place? or there is something wrong about my ejb-jar.xml or jboss.xml? Hope someone can help me on this.
My ejb-jar.xml contains:
<ejb-ref>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
com.titan.cabin.CabinHomeRemote
com.titan.cabin.CabinRemote
</ejb-ref>
and my jboss.xml looks like:
<enterprise-beans>
<ejb-name>TravelAgentEJB</ejb-name>
<jndi-name>ejb/TravelAgentEJB</jndi-name>
<ejb-ref>
<ejb-ref-name>ejb/CabinHome</ejb-ref-name>
<jndi-name>CabinEJB</jndi-name>
</ejb-ref>
</enterprise-beans>
In TravelAgentBean.java, I have
jndiContext.lookup("java:comp/evn/ejb/CabinHome");
Thanks in advance.
FengShuo, -
8. Re: problems when reference external jar deployed on same ap
lasterra Apr 24, 2002 9:06 AM (in response to kometen)do tou include de interfaces of CabinEJB in the trabelEJB jar?????
Regards, Enrique. -
9. Re: problems when reference external jar deployed on same ap
fsyu Apr 24, 2002 3:13 PM (in response to kometen)hmm...no. But I included the cabin.jar inside TravelJEB.jar. (why would i do that, I don't know and guess that is not right coz it still didn't work!)
By the way, after I jar all the files for Travel and Cabin in just one jar file (and hence, 'the travel.jar include the cabin interface) and deploy it to JBoss, all Client_1, 2, 3 are working fine.
But, I still want to deploy them as separate jars and sort of confuse about doing B2B call. As in many situations, jar files are prepared by several sub-teams. And B2B call should be very common scenario in EJB. I will try your suggestion and see how it goes. Thanks.
FengShuo,