tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r812084 - in /tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms: context/JMSBindingContext.java provider/JMSResourceFactory.java provider/JMSResourceFactoryImpl.java
Date Mon, 07 Sep 2009 11:17:34 GMT
Author: antelder
Date: Mon Sep  7 11:17:33 2009
New Revision: 812084

URL: http://svn.apache.org/viewvc?rev=812084&view=rev
Log:
TUSCANY-3255: Apply patch from Greg Dritschler to Consolidate JMS session management in JMSResourceFactory

Modified:
    tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/context/JMSBindingContext.java
    tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
    tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java

Modified: tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/context/JMSBindingContext.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/context/JMSBindingContext.java?rev=812084&r1=812083&r2=812084&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/context/JMSBindingContext.java
(original)
+++ tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/context/JMSBindingContext.java
Mon Sep  7 11:17:33 2009
@@ -66,7 +66,7 @@
     public synchronized void closeJmsSession() {
         if (jmsSession != null) {
             try {
-                jmsSession.close();
+                getJmsResourceFactory().closeSession(jmsSession);
             } catch (Exception e) {
                 throw new JMSBindingException(e);
             } finally {
@@ -89,7 +89,7 @@
     public synchronized void closeJmsResponseSession() {
         if (jmsResponseSession != null) {
             try {
-                jmsResponseSession.close();
+                getJmsResourceFactory().closeResponseSession(jmsResponseSession);
             } catch (Exception e) {
                 throw new JMSBindingException(e);
             } finally {

Modified: tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java?rev=812084&r1=812083&r2=812084&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
(original)
+++ tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactory.java
Mon Sep  7 11:17:33 2009
@@ -43,6 +43,8 @@
      */
     public abstract Session createSession() throws JMSException, NamingException;
 
+    public abstract void closeSession(Session session) throws JMSException;
+
     /*
      * (non-Javadoc)
      * 
@@ -80,6 +82,7 @@
      */
     public abstract Session createResponseSession() throws JMSException, NamingException;
 
+    public abstract void closeResponseSession(Session session) throws JMSException;
     
     public abstract void closeResponseConnection() throws JMSException;
 

Modified: tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java?rev=812084&r1=812083&r2=812084&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
(original)
+++ tuscany/branches/sca-java-1.5.1/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
Mon Sep  7 11:17:33 2009
@@ -89,6 +89,15 @@
     /*
      * (non-Javadoc)
      * 
+     * @see org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory#closeSession(javax.jms.Session)
+     */
+    public void closeSession(Session session) throws JMSException {
+        session.close();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
      * @see org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory#startConnection()
      */
     public void startConnection() throws JMSException, NamingException {
@@ -229,6 +238,10 @@
         return getResponseConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
     }
 
+    public void closeResponseSession(Session session) throws JMSException {
+        session.close();
+    }
+
     public Connection getResponseConnection() throws NamingException, JMSException {
         if (responseConnection == null) {
             if (responseConnectionFactoryName != null) {



Mime
View raw message