Author: nbelaevski
Date: 2011-01-13 09:46:11 -0500 (Thu, 13 Jan 2011)
New Revision: 20991
Modified:
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java
Log:
https://issues.jboss.org/browse/RF-10198
Modified:
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java
===================================================================
---
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-13
14:44:20 UTC (rev 20990)
+++
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/MessagingContext.java 2011-01-13
14:46:11 UTC (rev 20991)
@@ -115,7 +115,7 @@
}
public void stop() throws Exception {
- connection.stop();
+ connection.close();
connection = null;
}
Modified:
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java
===================================================================
---
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java 2011-01-13
14:44:20 UTC (rev 20990)
+++
trunk/core/impl/src/main/java/org/richfaces/application/push/impl/jms/PushContextImpl.java 2011-01-13
14:46:11 UTC (rev 20991)
@@ -32,9 +32,9 @@
import javax.faces.event.PreDestroyApplicationEvent;
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
-import javax.naming.CompositeName;
import javax.naming.InitialContext;
import javax.naming.Name;
+import javax.naming.NameParser;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -81,8 +81,11 @@
ConfigurationService configurationService =
ServiceTracker.getService(ConfigurationService.class);
InitialContext initialContext = new InitialContext();
- Name cnfName = new
CompositeName(configurationService.getStringValue(facesContext,
pushJMSConnectionFactory));
- Name topicsNamespace = new
CompositeName(configurationService.getStringValue(facesContext, pushJMSTopicsNamespace));
+
+ NameParser nameParser = initialContext.getNameParser("");
+
+ Name cnfName =
nameParser.parse(configurationService.getStringValue(facesContext,
pushJMSConnectionFactory));
+ Name topicsNamespace =
nameParser.parse(configurationService.getStringValue(facesContext,
pushJMSTopicsNamespace));
messagingContext = new MessagingContext(initialContext, cnfName,
topicsNamespace,
getApplicationName(facesContext),