Hi! I'm a jboss new user, I need HELP

I habe a Session bean (named TravelAgentBean) that
call a CMP entity bean (named CabinBean).
These two beans are deployed separatly, each one with
its own file descriptor ejb-jar.xml

I have several questions:

- In my Session bean, I have:
Object obj = jndiContext.lookup("CabinBean"); and it's
seems to be OK.
When I replace the argument by
"java:comp/env/CabinBean" (default Context?) there is
an exception, why ?
I have to add some property so my jndiContext ?


-At the moment, I don't add a 'jboss.xml' file in my
deployed .jar file, so I use the default one.
The name of the argument for the 'lookup' is then the
name given by the tag <ejb-name> in the file
ejb-jar.xml, RIGHT ?.?????

And if I add the a 'jboss.xml' file, the name is the
one between <jndi-name> ?????

------- my session bean ejb-jar.xml file:
<enterprise-beans>
<session>
<ejb-name>TravelAgentBean</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>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>

------- the end of my jboss.xml file: (1)
<enterprise-beans>
<session>
<ejb-name>TravelAgentBean</ejb-name>
<jndi-name>TravelAgentBean</jndi-name>
<configuration-name>Default Stateless
SessionBean</configuration-name>
</session>
</enterprise-beans>

------ Since my session bean will have to call methods
of my entity bean, I hava to add this definitions in
jboss.xml ??????? (2)
<entity>
<ejb-name>CabinBean</ejb-name>
<jndi-name>CabinBean</jndi-name>
<configuration-name>CMP
EntityBean</configuration-name>
</entity>

THE PROBLEMS ARE:
- when i add (1), the deployment failed !!!!! WHY
?????
- is the part (2) needed ? 

AND AND.....
When i use only the ejb-jar.xml file (no jboss.xml
file, and the deployment process is OK) i have a
SERVER EXCEPTION when i have
'Class aClass = CabinHome.class , 'aClass' used for
the call PortableRemoteObject)

java.rmi.ServerException:RemoteException occured in
server thread; nested exception is:
java.rmi.ServerException occured:
com.titan.cabin.CabinHome 
at sun.rmi.transport.StreamRemoteCall exception
received (FromServerStreamRemoteCall.java:245)
.........
at
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:164)
at �Proxy1.listCabins(Unknown source)
at com.titan.travelagent.TravelAgentClient_1

Thanks for any help

Joel Cordonnier






___________________________________________________________
Do You Yahoo!?
Achetez, vendez! � votre prix! Sur http://encheres.yahoo.fr


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

Reply via email to