Hi Sirki,

> I am under the assumption that once method B is completed, the data should
> be committed to the database.
>
> Is my assumption true?

yep, I suppose so.


> If so, then what could be the problem??

think the problem is the per broker cache. When bean B is used the running tx of bean A will be suspended and a new tx for bean B starts. Bean B lookup a PB instance and OJB return a new PB instance, because now we use a different tx, so OJB can't reuse the PB instance from Bean A. If the object updated in Bean B was used in A too, then in the broker-cache of the PB instance used in bean A the outdated object will still be remain.

Did you try to running your test without an cache?

regards,
Armin

Srikanth R wrote:
Hi,

I am using OJB 1.0.0 in Jboss [3.2.5] environment. The
PersistenceBrokerFactoryClass used is "PersistenceBrokerFactorySyncImpl". We
are using PB API and per broker cache.

I am having problem with the PB / JTA transactions. Below is the scenario:

I have two session beans. First session bean's method A is calling second
session bean's method B. The "trans-attribute" of method A is "Required" and
that of method B is "RequiresNew".

The method B updates a record in the database. This updated record is
fetched from database in method A after the call to method B.

But when we retrieve this record, we are getting the old values and not the
updated values.

I am under the assumption that once method B is completed, the data should
be committed to the database.

Is my assumption true? If so, then what could be the problem??

Thanks,
Sriki



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to