David Jencks wrote:
> On 2002.10.03 22:12:42 -0400 Igor Fedorenko wrote:
> 
>>David Jencks wrote:
>>
>>>On 2002.09.27 16:21:33 -0400 Igor Fedorenko wrote:
>>>
>>>
>>>>David Jencks wrote:
>>>>
>>>>
>>>>>Hi Igor,
>>>>>
>>>>>I'd like to stick with the jboss tm and add the needed functionality.
>>>>>
>>>>>Can you outline what you have been thinking of?
>>>>
>>>>I want to allow resource manager specific variation of XAResource state
>>>
>>>>change sequence. This way we'll decouple different RMs from each other 
>>>>and developers will be able to concentrate on one RM without concerns
>>>
>>to 
>>
>>>>break others. I have very brief idea how this can be implemented, but I
>>>
>>>>believe it is doable and not too complicated.
>>>
>>>
>>>I'd like to see what you have in mind.
>>
>>I'm thinking about creating xa resource handlers responsible for making 
>>calls on xa resources. TransactionImpl will keep track of all xa 
>>resources involved into the transaction but will delegate "real" xa work 
>>to the appropriate handler. These handlers will implement interface 
>>something like:
>>
>>interface XAResourceHandler {
>>   void commit(TransactionImpl tx) throws ...;
>>   boolean delistResource(TransactionImpl tx, int flag)  throws ...;
>>   boolean enlistResource(TransactionImpl tx)  throws ...;
>>   void rollback(TransactionImpl tx) throws ...;
>>}
>>
>>We will provide DefaultXAResourceHandler which will work with ideal xa 
>>resource implementations but will allow registration of rm specific 
>>implementations which will support whatever crazy logic in necessary to 
>>work with the rm.
>>
>>Obviously I do not know all implementation details yet but I am pretty 
>>sure that it will not complicate our code much. Unfortunately I do not 
>>know when I'll be able to implement it.
> 
> 
> This looks like it would work, but I don't see why this would be better
> than implementing specific XAResource wrappers for the bizarre XAResource
> implementations.  I'm thinking
> 
> txImpl calls say XAWrapper.start(xid, TMRESUME)
> 
> and XAWrapper says, hmmm I don't support resume, I'll get a new branch on
> this tx and call BizarroXAResource.start(newXid, TMJOIN).
> 
> I think with either approach their may be problems keeping track of all the
> modifications.  Anyway I wonder if you have thought of this and know of
> problems with it.
> 
> thanks
> david jencks

Sometimes we going to need transaction context (list of all xa resources 
enlisted into tx and their statuses) to make correct xa call. For 
example, some rm require xares.start(TMJOIN) when second connection from 
the same rm joins the transaction while other support 
xares.start(TMNOFLAGS) only and I am sure there are rms that support both.

-- 
Igor Fedorenko
Think smart. Think automated. Think Dynamics.
www.thinkdynamics.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to