Hi,
EJB references are 'logical' names. There do not depend on the
enterprise
bean's homes in the target operational environment.
The bean provider using EJB references to locate other enterprise beans,
writes bean's code which is independant on the target operational
environment.
Binding the EJB references to the enterprise bean's homes in the target
environment
is delayed at the deployment time.
Kind regards.
H�l�ne.
"Halas, Miroslav" wrote:
>
> Phillipe,
>
> what is the advantage of using EJB References compared to normal JNDI
> lookup?
>
> Miro Halas
>
> -----Original Message-----
> From: Philippe Coq [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 20, 2000 4:44 AM
> To: Paolo Sommaruga
> Cc: [EMAIL PROTECTED]
> Subject: Re: jonas-ejb-ref missing
>
> Paolo Sommaruga wrote:
> >
> > Hi,
> >
> > I am tried to migrate my beans from JOnAS 2.2.2 to JOnAS 2.2.3. GenIC
> reports:
> >
> > ...
> > GenIC ERROR: When reading the Deployment Descriptors for order.xml
> > jonas-ejb-ref missing for ejb-ref-name ejb/jpaso/Customer
> > ...
> >
> > Actually the order.xml uses ejb-ref tag. I suppose JOnAS 2.2.3 requires a
> > similar tag in the jonas-order.xml proprietary file.
> > What is the correct syntax for jonas-ejb-ref ?
> >
> > I have looked at documentation but I haven't find.
> >
> > Thanks
> >
> > Paolo Sommaruga
> Hi Paolo,
> we have developped the ejbref features in the current version.
> Unfortunately the JOnAS 2.2.3 was not well commited and incomplete,
> since the date of the 2.2.3 we have receive a new version
> of Jonathan that fix the Jeremie bug found by Miroslav
> so we wanted to integrate this new jonathan version
> a JOnAS 2.2.4 version that will be tagged and available today.
> I think it will better for you to migrate from JOnAS 2.2.2
> to JOnAS 2.2.4 directly.
> In this version you will find documentation about EJB reference
> Here is what you will find in the JOnAS Bean Programmer's Guide:
>
> EJB references
>
> The EJB references are special entries in the enterprise bean's
> environment.
> EJB references allow the Bean Provider to refer to the homes of other
> enterprise beans using logical names.
> For such entries it is recommended to use subcontexts java:comp/env/ejb.
>
> The declaration of the EJB references in the standard deployment
> descriptor looks like:
>
> <ejb-ref>
> <ejb-ref-name>ejb/ses1</ejb-ref-name>
> <ejb-ref-type>session</ejb-ref-type>
> <home>tests.SS1Home</home>
> <remote>tests.SS1</remote>
> </ejb-ref>
>
>
> The JOnAS specific deployment descriptor should map the environment JNDI
> name of the EJB reference to
> the JNDI name of the associated enterprise bean home. This is done in
> the JOnAS specific deployment
> descriptor using the jonas-ejb-ref element.
>
> <jonas-session>
> <ejb-name>SSA</ejb-name>
> <jndi-name>SSAHome</jndi-name>
> <jonas-ejb-ref>
> <ejb-ref-name>ejb/ses1</ejb-ref-name>
> <jndi-name>SS1Home_one</jndi-name>
> </jonas-ejb-ref>
> </jonas-session>
>
>
> The bean locates the home interface of the other enterprise bean using
> the EJB reference with this code:
> The bean locates the home interface of the other enterprise bean using
> the EJB reference with this code:
>
> InitialContext ictx = new InitialContext();
> Context myenv = ictx.lookup("java:comp/env");
> SS1Home home =
> (SS1Home)javax.rmi.PortableRemoteObject.narrow(myEnv.lookup("ejb/ses1"),
> SS1Home.class);
>
> I hope it helps
--
-=- H�l�ne JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
mailto:[EMAIL PROTECTED] http://www.evidian.com
Phone: 33.4.76.29.73.53 Fax: 33.4.76.29.76.00
Download our EJB Server JOnAS at http://www.objectweb.org
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".