I deploy in 10 different jars because different groups are developing
different components.  Life is easier if we let each group maintain
independent jars.  I tried the ejb-link tag in ejb-ref, but it said it could
not find the referenced jar in the application.  From this I'm inferring
that it wants everything in a single ear file.  Is that correct?  If not,
could someone give me a working example.  Here is what I currently have when
ejb DbRelay invokes ejb DbTester (does not work):

ejb-jar.xml of DbRelay:
         <ejb-ref>
            <ejb-ref-name>ejb/guyr/DbTester</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <ejb-link>guyr.DbTester</ejb-link>
            <home>guyr.DbTesterHome</home>
            <remote>guyr.DbTester</remote>
         </ejb-ref>

jboss.xml of DbRelay
      <ejb-name>guyr.DbRelay</ejb-name>
      <jndi-name>guyr/DbRelay</jndi-name>
      <ejb-ref>
         <ejb-ref-name>ejb/guyr/DbTester</ejb-ref-name>
         <jndi-name>guyr/DbTester</jndi-name>
      </ejb-ref>

The call in DbRelay:

         DbTesterHome home = (DbTesterHome) new
InitialContext().lookup("java:comp/env/ejb/guyr/DbTester");


----- Original Message -----
From: "Schouten, Andreas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 10:51 AM
Subject: RE: [JBoss-user] Home and remote classes for EJB to EJB call


> Wy do You deploy the 10 beans in 10 jars? If You deploy them all into one
> jar You can call all interfaces.
>
> If You need them in different jars, check out the <resource-ref> tag for
> ejb-jar and register the nessasary references to the container..
>
>
> > -----Original Message-----
> > From: Guy Rouillier [SMTP:[EMAIL PROTECTED]]
> > Sent: 30 April 2001 21:07
> > To: JBoss User
> > Subject: [JBoss-user] Home and remote classes for EJB to EJB call
> >
> > Following the discussion on this mail list, I tried my hand at getting
one
> > EJB to call another.  When the client invoked the first EJB, I got a
> > remote
> > exception because the first one could not locate the home and remote
> > interface for the second.  So I modified the jar for the first EJB to
> > include the home and remote interface classes for the 2nd, and then
> > everything worked fine.
> >
> > Is there any way to get JBoss (or generic app server) to use the home
and
> > remote classes that are included in the jar for the first EJB?  This can
> > get
> > out of hand quickly if I have to include the home and remote interfaces
> > classes in every jar that invokes a particular EJB; if I have 10 EJBs
> > calling another EJB, I would need to have the home and remote interfaces
> > for
> > that last EJB in all 10 jars.  And the code is already running in the
same
> > instance of JBoss, although I realize to generalize this assumption
cannot
> > be made.  If not, can I leave the home and remote interface classes **
out
> > of ** the jar for the first EJB and put it into a JAR in the lib/ext
> > directory, so I only need to have one copy of the home and remote
> > interfaces
> > classes on a single instance of JBoss?  Or must the home and remote
> > interfaces be in the jar for the corresponding EJB?
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to