Accessing EJB from another application is exactly the way  you access from
client.  Since each application is independent to each other you have to get
the reference of the EJB exactly the same way as you get from client
application.  You have to provide jndi.properties or you can provide
properties while creating InitialContext.

-kesav


----- Original Message -----
From: "Ruchira Amarasinghe" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Thursday, February 21, 2002 1:59 AM
Subject: Accessing EJB in app 'A' from EJB in app 'B'


> Hi,
> I have an two applications (A and B) deployed on orion. I want to access
> an EJB in A (ejb/WalletController) from an EJB in B (ejb/PaymentHandler)
>
> I can access the EJB in A from a normal client application using
> jndi.properties file. But when I try from an EJB I get a
> javax.Naming.NameNotFoundException.
>
> Here's my ejb-jar.xml, and orion-ejb-jar.xml for Application B.
> I'm especially not sure how to give
> <ejb-ref-mapping location="ormi://localhost/B" ... />
> in orion-ejb-jar.xml.
>
>
> ------------- ejb-jar.xml ---------------------
>
>       <session>
> <display-name> bean</display-name>
> <ejb-name>ejb/PaymentHandler</ejb-name>
>          <home>xxx.ejb.PaymentHandlerHome</home>
>          <remote>xxx.ejb.PaymentHandler</remote>
>          <ejb-class>xxx.ejb.PaymentHandlerBean</ejb-class>
>    <session-type>Stateless</session-type>
>    <transaction-type>Container</transaction-type>
>    <ejb-ref>
>      <ejb-ref-name>ejb/WalletController</ejb-ref-name>
>      <ejb-ref-type>Session</ejb-ref-type>
>      <home>yyy.WalletControllerHome</home>
>        <remote>yyy.WalletController</remote>
> </ejb-ref>
>       </session>
>
> --------- orion-ejb-jar.xml ---------------
>
> <enterprise-beans>
> <session-deployment name="ejb/PaymentHandler" >
> <ejb-ref-mapping location="ormi://localhost/B"
> name="ejb/WalletController" />
> </session-deployment>
> </enterprise-beans>
>
> Any help will be appreciated,
> Thanks
> RT
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>

Reply via email to