Hi,

joel cordonnier wrote:
> 
> I have a strange message 'Binding ejb/CabinHome to
> internal JNDI source: null' WHY ?????? (see below my
> .xml deployment files)

There is an error in your deployment files (see below), so the ejb-ref
does not get bound. 

 
> And when I run the sample, the class TravelAgentBean
> thows an exception when ANY field or method is called
> on a CabinHome reference. (for example, when calling
> PortableRemoteObject, the CabinHome reference is
> needed)

If the ejb-ref is not bound, you cannot access the CabinHome from
travelagent, so it is normal. (well, at least, coherent)



> ------- CABIN \ EJB-JAR.XML
> <?xml version="1.0" encoding="UTF-8"?>
> <ejb-jar>
> <enterprise-beans>
> <entity>
> <description>
> This Cabin enterprise bean entity represents a cabin
> on a cruise ship
> </description>
> <ejb-name>CabinHome</ejb-name>
            ^^^^^^^^^

The ejb-name of the cabin bean is "CabinHome" in cabin \ ejb-jar.xml


> </entity>
> </enterprise-beans>
> </ejb-jar>
> 
> -----CABIN \ JBOSS.XML
> <?xml version="1.0" encoding="Cp1252"?>
> <jboss>
>     <enterprise-beans>
>     <entity>
>     <ejb-name>ejb/CabinHome</ejb-name>
                ^^^^^^^^^^^^^

Here it is "ejb/CabinHome".  So jboss doesn't make the link between the
tags in the 2 files.  So it does not deploy cabin under jndi-name
"ejb/CabinHome" but under (default=ejb-jar's ejb-name) CabinHome.  So
further, in travelagent, the ejb-ref to ejb/CabinHome points to nothing.

What is strange is that with these files jboss should complain about the
mismatch during cabin deployment.  What version are you using?  Do you
have the trace of the cabin deployment?


Hope this helps,

Sebastien


>     <jndi-name>ejb/CabinHome</jndi-name>
>     </entity>
>     </enterprise-beans>
> </jboss>
> 
> ------- TRAVELAGENT \ EJB-JAR.XML
> <?xml version="1.0" encoding="UTF-8"?>
> <ejb-jar>
> <enterprise-beans>
> 
> <session>
> <ejb-name>TravelAgentHome</ejb-name>
> <home>com.titan.travelagent.TravelAgentHome</home>
> <remote>com.titan.travelagent.TravelAgent</remote>
> <ejb-class>com.titan.travelagent.TravelAgentBean</ejb-class>
> <session-type>Stateless</session-type>
> <transaction-type>Container</transaction-type>
> 
> <ejb-ref>
> <ejb-ref-name>ejb/CabinHome</ejb-ref-name>
> <ejb-ref-type>Entity</ejb-ref-type>
> <home>com.titan.cabin.CabinHome</home>
> <remote>com.titan.cabin.Cabin</remote>
> </ejb-ref>
> 
> </session>
> </enterprise-beans>
> </ejb-jar>
> 
> -----TRAVELAGENT \ JBOSS.XML
> <?xml version="1.0" encoding="Cp1252"?>
> 
> <jboss>
>     <enterprise-beans>
>     <session>
>     <ejb-name>TravelAgentHome</ejb-name>
>     <ejb-ref>
>     <ejb-ref-name>ejb/CabinHome</ejb-ref-name>
>     <jndi-name>ejb/CabinHome</jndi-name>
>     </ejb-ref>
>     </session>
>     </enterprise-beans>
> </jboss>
> 
> ___________________________________________________________
> Do You Yahoo!?
> Achetez, vendez! � votre prix! Sur http://encheres.yahoo.fr
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to