[jboss-cvs] JBossAS SVN: r114726 - in branches/JBPAPP_5_2_0_GA_JBPAPP-10995: integration/EAP4/src/main/org/jboss/jms/server/endpoint and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 13 22:07:54 EST 2014
Author: aogburn
Date: 2014-02-13 22:07:53 -0500 (Thu, 13 Feb 2014)
New Revision: 114726
Modified:
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/AS5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP4/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/client/container/JmsClientAspectXMLLoader.java
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
Log:
[JBPAPP-10995] commit fix
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/AS5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/AS5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/AS5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -29,7 +29,6 @@
import javax.jms.JMSException;
-import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientConnectionDelegate;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
@@ -276,25 +275,13 @@
String connectionID = endpoint.getConnectionID();
- ConnectionAdvised connAdvised;
+ ConnectionAdvised connAdvised = new ConnectionAdvised(endpoint);
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- connAdvised = new ConnectionAdvised(endpoint);
- }
-
Dispatcher.instance.registerTarget(connectionID, connAdvised);
log.trace("created and registered " + endpoint);
-
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- return new ClientConnectionDelegate(connectionID, serverPeer.getServerPeerID());
- }
+
+ return new ClientConnectionDelegate(connectionID, serverPeer.getServerPeerID());
}
public byte[] getClientAOPStack() throws JMSException
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP4/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP4/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP4/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -30,7 +30,6 @@
import javax.jms.JMSException;
-import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientConnectionDelegate;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
@@ -279,25 +278,13 @@
String connectionID = endpoint.getConnectionID();
- ConnectionAdvised connAdvised;
+ ConnectionAdvised connAdvised = new ConnectionAdvised(endpoint);
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- connAdvised = new ConnectionAdvised(endpoint);
- }
-
Dispatcher.instance.registerTarget(connectionID, connAdvised);
log.trace("created and registered " + endpoint);
-
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- return new ClientConnectionDelegate(connectionID, serverPeer.getServerPeerID());
- }
+
+ return new ClientConnectionDelegate(connectionID, serverPeer.getServerPeerID());
}
public byte[] getClientAOPStack() throws JMSException
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/integration/EAP5/src/main/org/jboss/jms/server/endpoint/ServerConnectionFactoryEndpoint.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -29,7 +29,6 @@
import javax.jms.JMSException;
-import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientConnectionDelegate;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
import org.jboss.jms.delegate.ConnectionFactoryEndpoint;
@@ -276,25 +275,13 @@
String connectionID = endpoint.getConnectionID();
- ConnectionAdvised connAdvised;
-
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- connAdvised = new ConnectionAdvised(endpoint);
- }
-
+ ConnectionAdvised connAdvised = new ConnectionAdvised(endpoint);
+
Dispatcher.instance.registerTarget(connectionID, connAdvised);
log.trace("created and registered " + endpoint);
-
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- return new ClientConnectionDelegate(connectionID, serverPeer.getServerPeerID());
- }
+
+ return new ClientConnectionDelegate(connectionID, serverPeer.getServerPeerID());
}
public byte[] getClientAOPStack() throws JMSException
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/client/container/JmsClientAspectXMLLoader.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/client/container/JmsClientAspectXMLLoader.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/client/container/JmsClientAspectXMLLoader.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -61,43 +61,38 @@
*/
public void deployXML(byte[] config) throws Exception
{
+
+ InputStream is = null;
+
+ try
+ {
+ is = new ByteArrayInputStream(config);
- //We need to synchronized to prevent a deadlock
- //See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- InputStream is = null;
+ DocumentBuilderFactory docBuilderFactory = null;
- try
- {
- is = new ByteArrayInputStream(config);
+ docBuilderFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilderFactory docBuilderFactory = null;
-
- docBuilderFactory = DocumentBuilderFactory.newInstance();
-
- docBuilderFactory.setValidating(false);
-
- InputSource source = new InputSource(is);
-
- URL url = AspectXmlLoader.class.getResource("/jboss-aop_1_0.dtd");
-
- source.setSystemId(url.toString());
-
- DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
-
- docBuilder.setEntityResolver(new Resolver());
-
- Document doc = docBuilder.parse(source);
-
- this.deployXML(doc, null, this.getClass().getClassLoader());
- }
- finally
+ docBuilderFactory.setValidating(false);
+
+ InputSource source = new InputSource(is);
+
+ URL url = AspectXmlLoader.class.getResource("/jboss-aop_1_0.dtd");
+
+ source.setSystemId(url.toString());
+
+ DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
+
+ docBuilder.setEntityResolver(new Resolver());
+
+ Document doc = docBuilder.parse(source);
+
+ this.deployXML(doc, null, this.getClass().getClassLoader());
+ }
+ finally
+ {
+ if (is != null)
{
- if (is != null)
- {
- is.close();
- }
+ is.close();
}
}
}
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionfactory/ConnectionFactoryJNDIMapper.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -35,7 +35,6 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.jboss.aop.AspectManager;
import org.jboss.jms.client.JBossConnectionFactory;
import org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate;
import org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate;
@@ -236,15 +235,8 @@
// Now bind it in JNDI
rebindConnectionFactory(initialContext, jndiBindings, delegate);
- ConnectionFactoryAdvised advised;
+ ConnectionFactoryAdvised advised = new ConnectionFactoryAdvised(endpoint);
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- advised = new ConnectionFactoryAdvised(endpoint);
- }
-
// Registering with the dispatcher should always be the last thing otherwise a client could
// use a partially initialised object
Dispatcher.instance.registerTarget(id, advised);
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -29,7 +29,6 @@
import java.util.Map;
import java.util.Set;
-import org.jboss.aop.AspectManager;
import org.jboss.jms.delegate.ConnectionEndpoint;
import org.jboss.jms.server.ConnectionManager;
import org.jboss.jms.server.endpoint.ServerConnectionEndpoint;
@@ -371,13 +370,8 @@
// wrap the Endpoint in the ConnectionAdvised so that we get a proper call back for the close
// TODO: What we really need to do is to wrap the End point in registerConnection, when we
// get the connection. But, I'm hesitant, because there are are many of instanceof checks that would
- // fail if I wrapped it during registerConneciton.
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- sce = new ConnectionAdvised(sce);
- }
+ // fail if I wrapped it during registerConneciton.
+ sce = new ConnectionAdvised(sce);
try
{
sce.closing(-1);
@@ -469,13 +463,8 @@
}
// wrap the Endpoint in the ConnectionAdvised so that we get a proper call back for the close
// TODO: What we really need to do is to wrap the Endpoint in registerConnection, when we
- // get the connection. Then anyone
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- conn = new ConnectionAdvised(conn);
- }
+ // get the connection. Then anyone
+ conn = new ConnectionAdvised(conn);
try
{
conn.closing(-1);
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -36,7 +36,6 @@
import javax.jms.JMSException;
import javax.jms.Session;
-import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientSessionDelegate;
import org.jboss.jms.client.remoting.CallbackManager;
import org.jboss.jms.delegate.ConnectionEndpoint;
@@ -265,15 +264,8 @@
sessions.put(sessionID, ep);
}
- SessionAdvised advised;
+ SessionAdvised advised = new SessionAdvised(ep);
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- advised = new SessionAdvised(ep);
- }
-
SessionAdvised sessionAdvised = advised;
serverPeer.addSession(sessionID, ep);
Modified: branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java
===================================================================
--- branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2014-02-14 02:00:44 UTC (rev 114725)
+++ branches/JBPAPP_5_2_0_GA_JBPAPP-10995/src/main/org/jboss/jms/server/endpoint/ServerSessionEndpoint.java 2014-02-14 03:07:53 UTC (rev 114726)
@@ -39,7 +39,6 @@
import javax.jms.InvalidDestinationException;
import javax.jms.JMSException;
-import org.jboss.aop.AspectManager;
import org.jboss.jms.client.delegate.ClientBrowserDelegate;
import org.jboss.jms.client.delegate.ClientConsumerDelegate;
import org.jboss.jms.delegate.Ack;
@@ -2024,15 +2023,8 @@
binding.queue.getName(), this, selectorString, false,
dest, null, null, 0, 1, true, false, prefetchSize);
- ConsumerAdvised advised;
+ ConsumerAdvised advised = new ConsumerAdvised(ep);
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- advised = new ConsumerAdvised(ep);
- }
-
Dispatcher.instance.registerTarget(consumerID, advised);
ClientConsumerDelegate stub =
@@ -2344,15 +2336,8 @@
rep.put(queue.getName(), DUR_SUB_STATE_CONSUMERS);
}
- ConsumerAdvised advised;
+ ConsumerAdvised advised = new ConsumerAdvised(ep);
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- advised = new ConsumerAdvised(ep);
- }
-
Dispatcher.instance.registerTarget(consumerID, advised);
ClientConsumerDelegate stub =
@@ -2408,15 +2393,8 @@
browsers.put(browserID, ep);
}
- BrowserAdvised advised;
+ BrowserAdvised advised = new BrowserAdvised(ep);
- // Need to synchronized to prevent a deadlock
- // See http://jira.jboss.com/jira/browse/JBMESSAGING-797
- synchronized (AspectManager.instance())
- {
- advised = new BrowserAdvised(ep);
- }
-
Dispatcher.instance.registerTarget(browserID, advised);
ClientBrowserDelegate stub = new ClientBrowserDelegate(browserID);
More information about the jboss-cvs-commits
mailing list