Hi everybody,
I was wondering whether OJB could be used in a managed enviroinment with distributed BMTs (Bean Managed Transactions) or not. In order to find an answer to my doubts, I downloaded the srcs and started to look for some useful clues and I didn't find anything stating the above scenario can be implemented, rather a hint that made me think it was not yet implemented (but planned for the future?).


That's what I found:
since, if I am not wrong, it is required to acquire a ManagedConnection from the Application Server implementation of the javax.resource.spi.ConnectionManager via a call to the allocateConnection(..., ...) method, I have searched for this call in the OJB srcs. As a result I got that the above call is issued only in two classes:


1. org.apache.ojb.otm.connector.JCAKit
2. org.apache.ojb.otm.connector.OTMConnectionManager

The former class calls the allocateConnection method over the latter one, so this entails that OJB provdes its own implementation of the javax.resource.spi.ConnectionManager, behaviour that is common to all those cases in which the application is outside a managed environment.

Question 1: why not relaying on the Application Server implementation of the ConnectionManager?

Furtheron, the javax.resource.spi.ManagedConnection returned as an org.apache.ojb.otm.connector.OTMJCAManagedConnection does not support the getXAResource() method, which is needed for enlisting the connections currently used by an application into the transactional context handled by the external TransactionManager according to the XOpen/XA Specification.

As I stated before, all these things made me think it is not possible to use BMTs along with OJB in managed environmet with distributed transaction, but possibily I'm just missing something, that's why I'm asking your help.

Any comments are appreciated

--
______________________________________________________
Francesco Russo
DLAB - Datawarehouse Laboratory
CINECA - Interuniversitary Computing Centre
via Magnanelli, 6/3
40033 Casalecchio di Reno (Bologna) - ITALY
e-mail: [EMAIL PROTECTED]



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



Reply via email to