Hi Jim (all),

Thanks for the informative reply. Since what I am working on wont be in
production for at least 3 or 4 months, I think I would rather start using
EJB 2.0 capabilities. The problem is, every book on the market is all EJB
1.1..so how do you learn what you can do with EJB 2.0, how to make the
calls, lookups, mappings, etc. The spec is almost certainly geared towards
vendors, and its not an easy read..not to mention short! Can you point me to
any docs, tutorials, etc that explain EJB 2.0, the differences, etc?

Thanks.


> -----Original Message-----
> From: Jim Archer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 27, 2000 2:59 PM
> To: Orion-Interest
> Cc: Duffey, Kevin
> Subject: RE: Can't call an EJB from Within another EJB
> 
> 
> Hi Kevin...
> 
> I have apps in which a servlet creates a stateless session 
> bean that in 
> turn creates an entity bean (or finds one that exists). It 
> runs fine. My 
> guess is that you have a deployment descriptor error if you 
> get a nameing 
> exception. Cjheck all your <EJB-REF> tags and remember that 
> they are scoped 
> to the bean in which they exist. If you want, for example, to 
> access a 
> PersonEB from two seperate beans, each of those seperate 
> beans needs an 
> <EJB-REF> entry within its definition for that PersonEB.
> 
> As for EJB 1.1 CMP being very limited, yes it is. Very 
> limited (as you 
> said). This is why third party OR Mapping tools like CocoBase 
> have become 
> extremely popular. With them, you define your relationship 
> schema and it 
> makes BMP beans for you. But don't dispair! You have several options. 
> First, use BMP instead. Next, CocoBase (and TopLink, a 
> similar product) 
> cost one heck of a lot less then that testing tool you use for the 
> performance tests (and we all know how much venture money you 
> guys have - 
> grin). The best solution (and the riskiest right now) is to 
> use EJB 2.0. 
> This has a tremendousely powerfull scheme for modeling complex 
> relationships.
> 
> We are developing for EJB 2.0 CMP in hopes of the spec going 
> final and 
> Orion supporting it fully soon. Hopefully, we will win that 
> bet. If we 
> don't, well... let's just say that the bleeding edge will 
> leave us with a 
> blood pressure of zero over zero.
> 
> Jim
> 
> 
> --On Thursday, October 26, 2000 12:14 PM -0700 "Duffey, Kevin" 
> <[EMAIL PROTECTED]> wrote:
> 
> > I HAVE THE SAME PROBLEM!!! I was about to write an email to the
> > list..hopefully someone else can answer this. Its pissing me off.
> >
> > My problem is that EJB A uses EJB B, but my servlet, when 
> it tries to get
> > EJB A, throws the naming exception. The code in EJB A 
> hasn't even ran
> > yet..and the stack trace says it can't find EJB B! That is 
> strange to me
> > on why if the code in EJB A that uses B isn't even running 
> yet..just when
> > the object is trying to be found, that it says it can't 
> find EJB B. Must
> > be some mechanism of EJB containers that makes sure they all exist.
> >
> > My EJB A does a JNDI call to java:comp/env/ejb/Test and 
> that should work
> > according to the ejb book I have. That is how a session bean uses an
> > entity bean supposedly. From what I read, a session bean 
> (or I suppose
> > any ejb) must use a JNDI lookup for every bean it wants to use. God
> > forbid if I had a bean that needed to use 50 other beans! 
> Isn't there a
> > way to simplify this process?
> >
> > Also, it appears EJB 1.1 entity CMP stuff is very 
> limited..VERY limited. I
> > can't have any type of joins. How then is a join done? Does EJB A
> > (session) that uses two entities, with entity A having a 
> join to entity
> > B..does this have to be done in code? You have to get all 
> the entities of
> > both A and B, then in code do a loop through all As and on 
> each iteration
> > do a loop through all B's and if the fields of both that are in the
> > "query" match, store that in a vector, then return that result? That
> > seems like a whole lot of code just to do a simple one to 
> many join of
> > two tables. It's enough to make me use standard JDBC sql, instead of
> > entity CMP.
> >
> >> -----Original Message-----
> >> From: J Davis [mailto:[EMAIL PROTECTED]]
> >> Sent: Wednesday, October 25, 2000 10:21 AM
> >> To: Orion-Interest
> >> Subject: Can't call an EJB from Within another EJB
> >>
> >>
> >> We have gotten our Orion server(1.3.8) to work with EJBs 
> on a singular
> >> level(i.e. we can call EJB A, B or C and it works fine.)  But
> >> If one of our
> >> EJB's tries to call another(i.e. A calls B)  A throws a
> >> naming exception
> >> that it can't find the EJB reference when doing a jndi
> >> lookup.  Is there a
> >> dependency tag or something within one of the XML files that
> >> denotes EJB
> >> dependencies on one another?  I'm sure this is something
> >> simple, but it is
> >> getting annoying.
> >>
> >>
> >>
> 
> 
> 
> 

Reply via email to