camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1138901 - /camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java
Date Thu, 23 Jun 2011 14:34:04 GMT
Author: davsclaus
Date: Thu Jun 23 14:34:04 2011
New Revision: 1138901

URL: http://svn.apache.org/viewvc?rev=1138901&view=rev
Log:
CAMEL-4129: jt400 pgm manager should start/stop the connection like the other does. Thanks
to Joao for the patch.

Modified:
    camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java

Modified: camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java?rev=1138901&r1=1138900&r2=1138901&view=diff
==============================================================================
--- camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java
(original)
+++ camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmProducer.java
Thu Jun 23 14:34:04 2011
@@ -154,4 +154,21 @@ public class Jt400PgmProducer extends De
         }
         return outputMsg.toString();
     }
+
+    @Override
+    protected void doStart() throws Exception {
+        if (!getISeriesEndpoint().getiSeries().isConnected()) {
+            LOG.info("Connecting to " + getISeriesEndpoint());
+            getISeriesEndpoint().getiSeries().connectService(AS400.COMMAND);
+        }
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        if (getISeriesEndpoint().getiSeries().isConnected()) {
+            LOG.info("Disconnecting from " + getISeriesEndpoint());
+            getISeriesEndpoint().getiSeries().disconnectAllServices();
+        }
+    }
+
 }



Mime
View raw message