I don't get the part about running in TX_REQUIRED not calling ejbLoad. The
shared flag (or whatever in Weblogic) is really what should impact ejbLoad
or not, but if it's using a new bean it has to call ejbLoad at least once.
Do you know that the container is trying to execute the business method on
the second bean for a fact, or could the first bean somehow be the one being
called but it's internal state has not been set correctly?
Cheers
-----Original Message-----
From: Ashutosh
To: [EMAIL PROTECTED]
Sent: 9/10/01 1:19 PM
Subject: Multiple instance of Beans created (Finder problem)
hi everyone,
We have 3 beans , 2 of them are Stateless Session Beans and the third
is
a Entity bean (using Bean managed persistence). All method in the
Entity
bean run in Supports txn scope.
The SSB 1 has a method in Required Txn scope in the Remote Interface
which looks for a specific row in the db using the Entity Beans
findByPrimary key method.
The SSB 1 then calls a biz. method on the entity bean. It then passes
on
the primary key atrributes to the SSB 2 method ( Required Txn scope
again
) which does a findByPrimary key on the Entity Beans ( basically looks
up
for the same row ) and calls a biz method in the Entity Bean.
The problem we are facing is,
When SSB2 calls the findByPrimaryKey method on the Entity bean a new
Bean
instance is created ( the constructor of the Bean is called ) and the
subsequent call to the biz method does not call the ejbLoad ( as it is
running in Required Txn scope. ) and as the attributes of the bean are
populated in the ejbLoad the biz method execution fails.
Since, we are refering to the same row in the table our understanding is
that another instance need not be created.However, the call to the
constructor defies our inderstanding.
We understand that passing the reference of the entity bean to the from
SSB1 to SSB2 would solve our problem. But, the behaviour exhibited
confuses us.
FYI, we are running EJB1.1 on Weblogic 5.1 with SP9.
Any pointers on the problem will be highly appreciated.
Thanks,
Ashutosh.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".