You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "John Stalker (JIRA)" <ji...@apache.org> on 2007/03/09 18:38:34 UTC

[jira] Created: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
---------------------------------------------------------------------------------------------------

                 Key: AMQ-1200
                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker, Connector
    Affects Versions: 4.1.0
         Environment: Linux 2.6.8-24.24-smp
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)

fresh checkout of activemq-4.1 and build (as of 05-March-07).
            Reporter: John Stalker
            Priority: Minor


Hi,

Here's the scenario:
I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).

Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.

Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.

Here's some debug output from the JCA:

PRE shutdown of external broker:
2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31

- snip - output of a resulting consumption of message

2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]

POST shutdown and restart of external broker

2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running

- as you can see, no XA here

2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]

Thanks for your help!
John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

Posted by "Kai Hudalla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kai Hudalla updated AMQ-1200:
-----------------------------

    Attachment: amq-1200.diff

Fix for AMQ-1200

> XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1200
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 4.1.0
>         Environment: Linux 2.6.8-24.24-smp
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)
> fresh checkout of activemq-4.1 and build (as of 05-March-07).
>            Reporter: John Stalker
>            Priority: Minor
>             Fix For: 5.2.0
>
>         Attachments: amq-1200.diff
>
>
> Hi,
> Here's the scenario:
> I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).
> Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.
> Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.
> Here's some debug output from the JCA:
> PRE shutdown of external broker:
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31
> - snip - output of a resulting consumption of message
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
> 2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> POST shutdown and restart of external broker
> 2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> - as you can see, no XA here
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> Thanks for your help!
> John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1200.
-----------------------------

    Fix Version/s: 5.1.0
                       (was: 5.2.0)
       Resolution: Fixed

Fixed by SVN revision 650392

> XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1200
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 4.1.0
>         Environment: Linux 2.6.8-24.24-smp
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)
> fresh checkout of activemq-4.1 and build (as of 05-March-07).
>            Reporter: John Stalker
>            Assignee: Rob Davies
>            Priority: Minor
>             Fix For: 5.1.0
>
>         Attachments: amq-1200.diff
>
>
> Hi,
> Here's the scenario:
> I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).
> Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.
> Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.
> Here's some debug output from the JCA:
> PRE shutdown of external broker:
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31
> - snip - output of a resulting consumption of message
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
> 2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> POST shutdown and restart of external broker
> 2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> - as you can see, no XA here
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> Thanks for your help!
> John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

Posted by "Alex DeNeui (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41201#action_41201 ] 

Alex DeNeui commented on AMQ-1200:
----------------------------------

I am using Jencks 2.0/Geronimo along with ActiveMQ 5.0 RA.  I took a look into this issue and it looks like the session object stored by the idle ServerSessionImpl's are stale on reconnect and also do not seem to throw an Exception when session.run() is called (which would get them evicted from the pool).  I added a small bit of code in ActiveMQEndpointWorker to close and recreate the ServerSessionPool everytime we try to reconnect.  This is a little brute-force but it appears to work for us.

--- src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java    (revision 617232)
+++ src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java    (working copy)
@@ -230,6 +230,12 @@
         consumer = null;
         safeClose(connection);
         connection = null;
+
+        // recreating ServerSessionPool because existing sessions are dead
+        //
+        LOG.debug("Recreating ServerSessionPool");
+        serverSessionPool.close();
+        serverSessionPool = new ServerSessionPoolImpl(this, endpointActivationKey.getActivationSpec().getMaxSessionsIntValue());
     }
 





> XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1200
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 4.1.0
>         Environment: Linux 2.6.8-24.24-smp
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)
> fresh checkout of activemq-4.1 and build (as of 05-March-07).
>            Reporter: John Stalker
>            Priority: Minor
>             Fix For: 5.2.0
>
>
> Hi,
> Here's the scenario:
> I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).
> Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.
> Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.
> Here's some debug output from the JCA:
> PRE shutdown of external broker:
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31
> - snip - output of a resulting consumption of message
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
> 2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> POST shutdown and restart of external broker
> 2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> - as you can see, no XA here
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> Thanks for your help!
> John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

Posted by "John Stalker (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38888 ] 

John Stalker commented on AMQ-1200:
-----------------------------------

It appears that this is worse than I thought...

I just noticed an XA rollback due to an application exception (correct behavior) which should cause the message to be redelivered every 10 minutes for 2 hours (set via the ra.xml file) until the message is processed successfully...should happen on the first try.

At any rate, messages sent after the rollback are delivered to the connector with the same behavior as above: no XA is utilized, so the messages pile up on the server side.

> XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1200
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 4.1.0
>         Environment: Linux 2.6.8-24.24-smp
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)
> fresh checkout of activemq-4.1 and build (as of 05-March-07).
>            Reporter: John Stalker
>            Priority: Minor
>
> Hi,
> Here's the scenario:
> I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).
> Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.
> Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.
> Here's some debug output from the JCA:
> PRE shutdown of external broker:
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31
> - snip - output of a resulting consumption of message
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
> 2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> POST shutdown and restart of external broker
> 2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> - as you can see, no XA here
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> Thanks for your help!
> John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

Posted by "Kai Hudalla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42374#action_42374 ] 

Kai Hudalla commented on AMQ-1200:
----------------------------------

Alex is right, the problem is that the _ActiveMQEndpointWorker_ calls _Connection.close()_ when it tries to re-connect to the broker. _ActiveMQConnection.close()_ will then stop message delivery on all its registered _Sessions_ by calling _ActiveMQSession.stop()_. Because of this the _Session.run()_ method invoked by _ServerSessionImpl.run()_ does not throw any exception but instead just doesn't do anything (and in particular does not deliver any messages to the _MessageListener_ registered with the _Session_).

I have modified the _ServerSessionImplTest_ test case to include a test for the _ServerSessionImpl_ to detect a stopped Session. I have tried to use Alex' diff in order to solve the problem but it didn't work for me. However, I have added some lines to _ServerSessionImpl_ to check if its Session is still running before calling its run() method. If it doesn't, the _ServerSessionImpl_ is marked as stale and will be evicted from the _ServerSessionPoolImpl_ using the _removeFromPool_ method  ... Pending messages are then dispatched to another (new) _ServerSessionImpl_ in the pool.

Kai

> XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1200
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 4.1.0
>         Environment: Linux 2.6.8-24.24-smp
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)
> fresh checkout of activemq-4.1 and build (as of 05-March-07).
>            Reporter: John Stalker
>            Priority: Minor
>             Fix For: 5.2.0
>
>
> Hi,
> Here's the scenario:
> I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).
> Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.
> Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.
> Here's some debug output from the JCA:
> PRE shutdown of external broker:
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31
> - snip - output of a resulting consumption of message
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
> 2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> POST shutdown and restart of external broker
> 2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> - as you can see, no XA here
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> Thanks for your help!
> John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

Posted by "John Stalker (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38985 ] 

John Stalker commented on AMQ-1200:
-----------------------------------

After poking around the activemq-ra code base a bit and looking through the log files detailing the failure of XA to come back after ActiveMQEndpointWorker.java calls into reconnect(JMSException error), I have a question that someone can hopefully shed some light on or some thoughts anyway.

>From what I can see, the ServerSessionImpl which was active when the problem happened (XA rollback, or connection failure with the broker, or whatever else) removes itself from the ServerSessionPoolImpl (via removeFromPool) and the EndpointWorker will reconnect.  Shouldn't ALL the ServerSessionImpl objects cached in the pool be invalidated and removed so that new ServerSessions come into play with the new connections?  Is there some Tom-foolery with the reconnect that binds the new connection(s) into the XA some place?

Thanks for any input...
John

> XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1200
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 4.1.0
>         Environment: Linux 2.6.8-24.24-smp
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)
> fresh checkout of activemq-4.1 and build (as of 05-March-07).
>            Reporter: John Stalker
>            Priority: Minor
>
> Hi,
> Here's the scenario:
> I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).
> Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.
> Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.
> Here's some debug output from the JCA:
> PRE shutdown of external broker:
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31
> - snip - output of a resulting consumption of message
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
> 2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> POST shutdown and restart of external broker
> 2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> - as you can see, no XA here
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> Thanks for your help!
> John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQ-1200) XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies reassigned AMQ-1200:
-------------------------------

    Assignee: Rob Davies

> XA fails to start when JCA rar re-establishes connectivity with an external broker (tcp transport).
> ---------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1200
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1200
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Connector
>    Affects Versions: 4.1.0
>         Environment: Linux 2.6.8-24.24-smp
> java version "1.5.0_09"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)
> fresh checkout of activemq-4.1 and build (as of 05-March-07).
>            Reporter: John Stalker
>            Assignee: Rob Davies
>            Priority: Minor
>             Fix For: 5.2.0
>
>         Attachments: amq-1200.diff
>
>
> Hi,
> Here's the scenario:
> I recently (ie, a couple days ago) downloaded and built the 4.1 branch, set up JBoss 4.0.5.GA with a slightly modified activemq-ra.rar (ra.xml modified to communicate with an external instance of the broker via tcp and setting UseInboundSession to true...not sure what this does really, but I tried it as false and the same behavior happens).
> Via a persistent queue (oracle 10 backing), I'm consuming messages in an MDB via the JCA message datasource using XA.
> Here's the problem I'm seeing: if I shut down the JMS server, I see the appropriate EOF exception and subsequent reconnection attempts by the rar in JBoss. When I startup the external activemq broker again, the connection appears to get reestablished and work is accepted, started, and completed...EXCEPT there's no mention of XA and thus the message is never actually accepted and consumed.
> Here's some debug output from the JCA:
> PRE shutdown of external broker:
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> 2007-03-09 11:43:02,883 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Start: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:02,884 DEBUG [org.apache.activemq.TransactionContext] Started XA transaction: XID:257:6e6f64653131382f313134:31
> - snip - output of a resulting consumption of message
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] End: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,447 DEBUG [org.apache.activemq.TransactionContext] Ended XA transaction: XID:257:6e6f64653131382f313134:31
> 2007-03-09 11:43:04,448 DEBUG [org.apache.activemq.TransactionContext] Prepare: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:04,454 DEBUG [org.apache.activemq.TransactionContext] Commit: XidImpl[FormatId=257, GlobalId=node118/114, BranchQual=1, localId=114]
> 2007-03-09 11:43:05,150 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:43:05,178 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> POST shutdown and restart of external broker
> 2007-03-09 11:46:33,077 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Sending: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] Received WireFormat: WireFormatInfo { version=2, properties={TightEncodingEnabled=true, CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true, MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 before negotiation: OpenWireFormat{version=2, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false}
> 2007-03-09 11:46:33,126 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] tcp://seqlims.broad.mit.edu/18.103.10.168:61616 after negotiation: OpenWireFormat{version=2, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] ServerSession requested.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Using idle session: ServerSessionImpl:1
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Starting run.
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work accepted: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,196 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work started: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Running
> - as you can see, no XA here
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop start
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] run loop end
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl] Session returned to pool: ServerSessionImpl:1
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Run finished
> 2007-03-09 11:53:15,197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1] Work completed: javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@1461b5b]
> Thanks for your help!
> John

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.