db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject Re: OTM + Connections/Transactions
Date Tue, 23 Sep 2003 22:17:46 GMT
I have a solution to the BaseConnection type which I can check in now, 
however it still doesn't allow for registerConenction() to work 
correctly as registerConnection (wisely) throws an exception if it 
alreadfy is attached to a transaction, and all connections are created 
with a transaction.

I will check in my changes as a starting point as it doesn't break any 
existing functionality.

I have a unit test for this, but it fails - do we want to go TDD style 
and check in the test that fails before we have solution, or wait until 
we have a solution?

-Brian

On Tuesday, September 23, 2003, at 08:24 PM, Oleg Nitz wrote:

> Hi Brian,
>
> You are right, the right way to add OTMConnections to a Transaction is 
> to use
> the registerConnection() method, but I can't recall why the 
> parameter's type
> became BaseConnection :(
> If you have a solution please commit it to CVS or send it to me, 
> otherwise
> I'll try to fix this myself ASAP.
>
> Regards,
>  Oleg
>
> On Tuesday 23 September 2003 19:25, Brian McCallister wrote:
>> I think a better way might be to not assign connections a transaction
>> until they need one; change transaction.registerConnection() to take 
>> an
>> OTMConnection instead of a BaseConnection; and then allow a newly
>> aquired, but as yet unused, connection to be added to a transaction 
>> via
>> Transaction.registerConnection().
>>
>> I have actually almost finished making these changes ;-)
>>
>> -Brian
>>
>> On Tuesday, September 23, 2003, at 03:20 PM, Raghuram Rajah wrote:
>>> Hi Brian,
>>>
>>> The trick is to get to the tx factory. But I realize that there is no
>>> clean
>>> way to do that. I will add a new API into the Kit that will allow you
>>> to
>>> acquire new connections within the scope of a particular transaction.
>>>
>>> Raghu.
>>>
>>> -----Original Message-----
>>> From: Brian McCallister [mailto:mccallister@forthillcompany.com]
>>> Sent: Tuesday, September 23, 2003 11:40 AM
>>> To: OJB Developers List
>>> Subject: OTM + Connections/Transactions
>>>
>>>
>>> One of the stated features of the OTM is that it supports multiple
>>> connections in one transaction -- however, I cannot figure out how to
>>> do this. I have patched up OJB so that you can bind a connection to a
>>> transaction (in OTM) after creating the connection, but... I want to
>>> make sure I am simply not missing something obvious.
>>>
>>> Raghu, Matt? Any tips on using multiple connections per transaction?
>>>
>>> -Brian
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message