axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r384212 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: client/ServiceClient.java description/ClientUtils.java engine/ListenerManager.java
Date Wed, 08 Mar 2006 13:39:24 GMT
Author: deepal
Date: Wed Mar  8 05:39:24 2006
New Revision: 384212

URL: http://svn.apache.org/viewcvs?rev=384212&view=rev
Log:
- we are not starting all the listeners when we start up ServiceClient (Fixing 457)

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=384212&r1=384211&r2=384212&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
Wed Mar  8 05:39:24 2006
@@ -189,9 +189,9 @@
             trsManager = new ListenerManager();
             trsManager.init(this.configContext);
         }
-        if (!trsManager.isStopped()) {
-            trsManager.start();
-        }
+//        if (!trsManager.isStopped()) {
+//            trsManager.start();
+//        }
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java?rev=384212&r1=384211&r2=384212&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
Wed Mar  8 05:39:24 2006
@@ -6,6 +6,7 @@
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.ListenerManager;
 import org.apache.axis2.i18n.Messages;
 
 import javax.xml.namespace.QName;
@@ -40,12 +41,16 @@
         if (options.isUseSeparateListener()) {
             if ((listenerTransportProtocol != null) && !"".equals(listenerTransportProtocol))
{
                 transportIn = ac.getTransportIn(new QName(listenerTransportProtocol));
-
+                ListenerManager listenerManager =
+                        msgCtxt.getConfigurationContext().getListenerManager();
                 if (transportIn == null) {
                     // TODO : User should not be mandated to give an IN transport. If it
is not given, we should
                     // ask from the ListenerManager to give any available transport for this
client.
                     throw new AxisFault(Messages.getMessage("unknownTransport",
                             listenerTransportProtocol));
+                }
+                if (!listenerManager.isListenerRunning(transportIn.getName().getLocalPart()))
{
+                    listenerManager.addListener(transportIn, false);
                 }
             }
             if (msgCtxt.getAxisService() != null) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java?rev=384212&r1=384211&r2=384212&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
Wed Mar  8 05:39:24 2006
@@ -136,10 +136,15 @@
         TransportListener transportListener = trsIn.getReceiver();
         if (transportListener != null) {
             if (!start) {
+                transportListener.init(configctx,trsIn);
                 transportListener.start();
             }
             startedTranports.put(trsIn.getName().getLocalPart(), transportListener);
         }
+    }
+
+    public boolean isListenerRunning(String transportName) {
+        return startedTranports.get(transportName) != null;
     }
 
     public boolean isStopped() {



Mime
View raw message