You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ja...@apache.org on 2006/03/22 03:20:07 UTC

svn commit: r387691 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: description/ClientUtils.java engine/ListenerManager.java

Author: jaliya
Date: Tue Mar 21 18:20:05 2006
New Revision: 387691

URL: http://svn.apache.org/viewcvs?rev=387691&view=rev
Log:
Fixed the synchronization problem in client side

Modified:
    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/description/ClientUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java?rev=387691&r1=387690&r2=387691&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 Tue Mar 21 18:20:05 2006
@@ -17,7 +17,7 @@
  */
 public class ClientUtils {
 
-    public static TransportOutDescription inferOutTransport(AxisConfiguration ac,
+    public static synchronized TransportOutDescription inferOutTransport(AxisConfiguration ac,
                                                             EndpointReference epr) throws AxisFault {
         if (epr == null || (epr.getAddress() == null)) {
             throw new AxisFault(Messages.getMessage("cannotInferTransport"));
@@ -33,7 +33,7 @@
         }
     }
 
-    public static TransportInDescription inferInTransport(AxisConfiguration ac,
+    public static synchronized TransportInDescription inferInTransport(AxisConfiguration ac,
                                                           Options options,
                                                           MessageContext msgCtxt) throws AxisFault {
         String listenerTransportProtocol = options.getTransportInProtocol();

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=387691&r1=387690&r2=387691&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 Tue Mar 21 18:20:05 2006
@@ -55,7 +55,7 @@
      * @param tranportName : name of the trasport can be null , if it is null then
      * @return String
      */
-    public EndpointReference getERPforService(String serviceName, String opName,
+    public synchronized EndpointReference getERPforService(String serviceName, String opName,
                                               String tranportName) throws AxisFault {
         if (tranportName == null || "".equals(tranportName)) {
             AxisService service = configctx.getAxisConfiguration().getService(serviceName);
@@ -93,7 +93,7 @@
     /**
      * To start all the tranports
      */
-    public void start() {
+    public synchronized void start() {
         Iterator tranportNames = configctx.getAxisConfiguration().
                 getTransportsIn().values().iterator();
         while (tranportNames.hasNext()) {
@@ -114,7 +114,7 @@
         stopped = false;
     }
 
-    public void startSystem(ConfigurationContext configurationContext) {
+    public synchronized void startSystem(ConfigurationContext configurationContext) {
         init(configurationContext);
         start();
     }
@@ -122,7 +122,7 @@
     /**
      * To stop all the tranport
      */
-    public void stop() throws AxisFault {
+    public synchronized void stop() throws AxisFault {
         Iterator itr_st = startedTranports.values().iterator();
         while (itr_st.hasNext()) {
             TransportListener transportListener = (TransportListener) itr_st.next();
@@ -136,7 +136,7 @@
      * @param started : whether transport Listener running or not
      * @throws AxisFault : will throw AxisFault if something goes wrong
      */
-    public void addListener(TransportInDescription trsIn, boolean started) throws AxisFault {
+    public synchronized void addListener(TransportInDescription trsIn, boolean started) throws AxisFault {
         configctx.getAxisConfiguration().addTransportIn(trsIn);
         TransportListener transportListener = trsIn.getReceiver();
         if (transportListener != null) {
@@ -149,7 +149,7 @@
         }
     }
 
-    public boolean isListenerRunning(String transportName) {
+    public synchronized boolean isListenerRunning(String transportName) {
         return startedTranports.get(transportName) != null;
     }