Hi Andrew,

----- Original Message -----
From: "Andrew Gilbert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 03, 2003 12:57 AM
Subject: Separating LocalTxManager and JTATxManager Use


Have a question trying to use OJB under a J2EE environment. If one
deploys web and ejb components under one web application, what is best
means to ensure proper TxManager is employed? The configuration appears
to be global.
####
Right

Would seem that web code would want a LocalTxManager, EJB's would want a
JTATxManager. Is this not the case?
####
Right again. Except for the PB-api this does currently not use the
Transaction Synchronization mechanism. But I want to add this too.

Options include:

1. Separate web and ejb into separate applications for deployment, and
configure each according to needs.
####
seems for me the best solution

2. Create two PBFactory instances, one configured for local and one for
JTA?
####
Will not work because there are some more j2ee specific configuration
properties.

3. Implement custom JTATxFactory and make it smart enough to detect if
under JTS or not and act accordingly?
####
see 2 / should be possible if we change the ConnectionFactoryManagedImpl
too.

Detecting and ensuring use of container datasource is not an issue, as
can add JdbcConnectionDescriptor at runtime.

A related question is, does any of this matter when just using PB API
and not ODMG? One hopes it does somewhat, as don't want
commits/rollbacks going through unless container is happy.
####
As I said above, currently the PB-api does not use Synchronization, thus
it's different
from the ODMG-api.

regards,
Armin

Thanks.



---------------------------------------------------------------------
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