On 19 Aug, David Jencks wrote:
> Maybe if I try hard enough I can be a lttle clearer ;-)

Oh, I must have been writing in my sleep...
> 
> Lets say you are using jms in a situation where in a transaction you want
> to do some work in a database and send a jms message.  Normally this
> requires 2 phase commit (2pc) since normally the database and the jms
> system are different resource managers.  You can't do this scenario unless
> you have an xa capable db driver.
> 
> However, if you happen to be using the same database as the persistence
> store for jms, it seems to me you can directly map the transaction activity
> on the jms resource to the underlying database resource.  If there is some
> way to tell the connection manager that the database resouce and the jms
> resource can be treated as the "same", you can avoid 2pc and either do a
> local transaction or 1 phase optimization on the xa resource. Either way
> you save a lot of time over 2pc.

I get it, now ;-)
> 
> 
> So, operating from a base of total ignorance of the jboss.mq architecture,
> let me plunge blindly ahead and suggest one way to do this might be to have
> the persistence plugin mechanism for jboss.mq be based on jca connectors. 
> Then the jms-ra can delegate the "isSameRM" method to the underlying
> connector's XAResource.  If it's the same- can do a local transaction or
> 1pc optimization.  If not, 2pc is required.  
> 
> This would require some other changes in the rest of the connector system. 
> In particular, the current local transaction jdbc 1 wrapper rar does not
> expose a XAResource, so there is no way to tell if its the same resource as
> anything else.
> 
> So, its an idea.  Any thoughts?

Ok, this is not my area. If the transaction handling is in fact
delegated to the persistence store XA this would be doable, but would
typically involve the JBossMQ team (and would if I understand it
correctly tie the jms-ra more closely to JBossMQ.

//Peter
> 
> david jencks
> 
> 
> On 2001.08.19 15:54:16 -0400 [EMAIL PROTECTED] wrote:
>> On 19 Aug, David Jencks wrote:
>> > Hi,
>> > 
>> > I'm planning to move the two jboss jca-jdbc resource adapter wrappers
>> to
>> > the connector module soon.  I'm wondering if it would be appropriate to
>> > move the jms-ra connector there also?  I think that it should either be
>> > with the other connectors or with jboss.mq.
>> > 
>> > Also, a question about jms-ra and xa transactions.  If you are using
>> jdbc
>> > persistence with jms, and the same connection factory for both jms and
>> your
>> > "regular" db work for e.g. cmp, one could theoretically avoid 2pc 
>> 
>> If you by 2pc means two face connect, then yes there is a part of this
>> in the spec: use local transaction. 
>> 
>> As far as I know, the JBoss connector is implemented in such a way that
>> you have to decide at config/deployment time if your resource adapter is
>> a "local transaction" one. This is the same for the jms-ra adapter. You
>> will have to configure a jms-ra adapter that uses local transactions and
>> use that. I have not turned this on by default (i fact is was a long
>> time ago since I last tested local transactions with the jms-ra).
>> 
>> //Peter
>> >by having
>> > the XAResources for the connection from the db and the connection from
>> jms
>> > report they are the same resource manager.  I spent just a few minutes
>> > looking at the code and couldn't find if this is implemented.  Is it?
>> If
>> > not would it be a good idea? Is there some reason it shouldn't work? It
>> > seems to me that it would allow using transactional jms with a db that
>> > doesn't support xa/2pc (i.e. most of them)
>> > 
>> > thanks
>> > david jencks
>> > 
>> > _______________________________________________
>> > Jboss-development mailing list
>> > [EMAIL PROTECTED]
>> > http://lists.sourceforge.net/lists/listinfo/jboss-development
>> 
>> -- 
>> ------------------------------------------------------------
>> Peter Antman             Technology in Media, Box 34105 100 26 Stockholm
>> Systems Architect        WWW: http://www.tim.se
>> Email: [EMAIL PROTECTED]        WWW: http://www.backsource.org
>> Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 
>> ------------------------------------------------------------
>> 
>> 
>> _______________________________________________
>> Jboss-development mailing list
>> [EMAIL PROTECTED]
>> http://lists.sourceforge.net/lists/listinfo/jboss-development
>> 
>> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development

-- 
------------------------------------------------------------
Peter Antman             Technology in Media, Box 34105 100 26 Stockholm
Systems Architect        WWW: http://www.tim.se
Email: [EMAIL PROTECTED]        WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 
------------------------------------------------------------


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to