[jboss-jira] [JBoss JIRA] Closed: (JBMESSAGING-490) Race condition on ServerConsumerEndpoint creation
Ovidiu Feodorov (JIRA)
jira-events at jboss.com
Sat Aug 5 00:50:12 EDT 2006
[ http://jira.jboss.com/jira/browse/JBMESSAGING-490?page=all ]
Ovidiu Feodorov closed JBMESSAGING-490.
---------------------------------------
Resolution: Done
> Race condition on ServerConsumerEndpoint creation
> -------------------------------------------------
>
> Key: JBMESSAGING-490
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-490
> Project: JBoss Messaging
> Issue Type: Bug
> Reporter: Ovidiu Feodorov
> Assigned To: Ovidiu Feodorov
> Priority: Minor
> Fix For: 1.0.1.CR4
>
>
> Because "started" is not declared volatile, there's a minor race condition between the construction of the the ServerConsumerEndpoint on a started connection, and delivery request.
> Test fragment:
> conn.start();
> Session sess = conn.createSession(true, Session.SESSION_TRANSACTED);
> ....
> MessageConsumer cons1 = sess.createConsumer(queue);
> Trace:
> 2006-08-04 10:05:24,050 23375 DEBUG [org.jboss.jms.server.endpoint.ServerSessionEndpoint] (main:) creating consumer for JBossQueue[Queue], selector null, subscription null
> 2006-08-04 10:05:24,050 23375 TRACE [org.jboss.jms.server.endpoint.ServerConsumerEndpoint] (main:) creating consumer endpoint -2147483430
> 2006-08-04 10:05:24,050 23375 TRACE [org.jboss.messaging.core.ChannelSupport] (main:) CoreQueue[1] attempting to add receiver ConsumerEndpoint[-2147483430]
> 2006-08-04 10:05:24,050 23375 TRACE [org.jboss.messaging.core.ChannelSupport] (main:) receiver ConsumerEndpoint[-2147483430] added
> 2006-08-04 10:05:24,050 23375 DEBUG [org.jboss.jms.server.endpoint.ServerConsumerEndpoint] (main:) ConsumerEndpoint[-2147483430] created
> 2006-08-04 10:05:24,050 23375 TRACE [org.jboss.jms.server.endpoint.ServerConsumerEndpoint] (Thread-3:) ConsumerEndpoint[-2147483439] receives reference 3584 for delivery
> 2006-08-04 10:05:24,050 23375 TRACE [org.jboss.jms.server.endpoint.ServerSessionEndpoint] (main:) SessionEndpoint[-2147483431] caching consumer -2147483430
> 2006-08-04 10:05:24,050 23375 DEBUG [org.jboss.jms.server.endpoint.ServerConsumerEndpoint] (Thread-3:) ConsumerEndpoint[-2147483439] NOT started yet!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list