Hey Dirk

I read some non-good comments about DBCP in some posts on TheServerSide.
These really bothered me, and I'm reconsidering the usage.  Also I spent
some hours digging into JBoss and Geronimo source tree, and find out that
the best way to handle Connections/Pool/Transaction is to use JCA and JTA. A
simple JTA spec implementation is trivial, but a JCA is not. I'm working on
that right this moment. Not sure if we can join efforts with Geronimo guys
cause the JMX mess all around.

About your question, the container intercepts look ups for connections
(through JNDI) and associates the connection with a component activity
context - or other strategy. If a Transaction is already in place, or beguns
after that, the container asks for a XAResource and enlists it to get it
working with two phase commit protocol. A smart container implementation
will use the same enlisted connection throught the transaction lifecycle -
although it should not share it. The container can also register a
Syncronization within the transaction to release the resources as soon as
the transactions end (successful or not).

Right now I'm working just in the interfaces definitions. Then I'll work on
test cases and finally the implementation. Let me know if you'd like to give
me a hand on this, or if ASF-Commons would like such implementation.

Cheers,
hammett

----- Original Message ----- 
From: "Dirk Verbeeck" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Sunday, April 04, 2004 4:18 PM
Subject: Re: [DBCP] PoolManager + JTA simple implementation for local
transactions


I have created a prototype of a PoolingXADataSource a couple of months
ago. Someone asked about implementing a XA DBCP pool and I made this
prototype just to see if it was possible.
It probably needs some error handling and review of the corner cases
but it's a start. Anyway I just implemented the XA api from the
javadoc and not looked at the JTA specs.
Do you have some examples how a container uses a XADataSource?

-- Dirk

hammett wrote:
> Hey guys!
>
> I wonder if there is some activity on this subject around here. I already
> developed something like that but I'm not very satisfied. In fact I'm
having
> some trouble with lot of simultaneos access in my pool implementation. I'd
> like to migrate to DBCP Pool implementation (using an Avalon façade) but
it
> should support transactional contexts.
>
> An ordinary pool manages:
> - Creating and recycling connections
>
> An transactional pool:
> - Creating and recycling connections within same transaction
> - Kills the pool instance when transaction is over
>
> On the other hand I think ASF doesn't provide a JTA implementation (of
> course geronimo guys developed something) that can be used out-of-box.
There
> are projects out there (GPL) like XAPool and JOTM that does the same
thing,
> but with a lack of test cases and with an awkward architecture/design.
>
>
> What do you guys think ?
>
> --
> hammett
> http://www.apache.org/~hammett/
> http://jroller.com/page/hammett



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