Author: vanto
Date: Thu Sep 22 17:07:04 2011
New Revision: 1174267

URL: http://svn.apache.org/viewvc?rev=1174267&view=rev
Log:
some clean up: use constants instead of strings.

Modified:
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java
    ode/trunk/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java
    
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionInHandler.java
    
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java

Modified: ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java
URL: 
http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java?rev=1174267&r1=1174266&r2=1174267&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java 
(original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ODEService.java Thu Sep 
22 17:07:04 2011
@@ -71,6 +71,9 @@ public class ODEService {
 
     private static final Log __log = LogFactory.getLog(ODEService.class);
 
+    public static final String CALLBACK_SESSION_ENDPOINT = 
"callbackSessionEndpoint";
+    public static final String TARGET_SESSION_ENDPOINT = 
"targetSessionEndpoint";
+
     private AxisService _axisService;
     private BpelServer _server;
     private TransactionManager _txManager;
@@ -288,7 +291,7 @@ public class ODEService {
         if (correlationId != null) {
             odeMex.setProperty(MessageExchange.PROPERTY_SEP_MYROLE_SESSIONID, 
correlationId);
         } else {
-            Object otse = msgContext.getProperty("targetSessionEndpoint");
+            Object otse = msgContext.getProperty(TARGET_SESSION_ENDPOINT);
             if (otse != null) {
                 Element serviceEpr = (Element) otse;
                 WSAEndpoint endpoint = new WSAEndpoint();
@@ -298,7 +301,7 @@ public class ODEService {
             }
         }
 
-        Object ocse = msgContext.getProperty("callbackSessionEndpoint");
+        Object ocse = msgContext.getProperty(CALLBACK_SESSION_ENDPOINT);
         if (ocse != null) {
             Element serviceEpr = (Element) ocse;
             WSAEndpoint endpoint = new WSAEndpoint();
@@ -328,7 +331,7 @@ public class ODEService {
         if (odeMex.getProperty(MessageExchange.PROPERTY_SEP_MYROLE_SESSIONID) 
!= null) {
             WSAEndpoint sessionAwareEndPoint = new WSAEndpoint(_serviceRef);
             
sessionAwareEndPoint.setSessionId(odeMex.getProperty(MessageExchange.PROPERTY_SEP_MYROLE_SESSIONID));
-            msgContext.setProperty("callbackSessionEndpoint", 
sessionAwareEndPoint);
+            msgContext.setProperty(CALLBACK_SESSION_ENDPOINT, 
sessionAwareEndPoint);
         }
 
     }

Modified: 
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java
URL: 
http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java?rev=1174267&r1=1174266&r2=1174267&view=diff
==============================================================================
--- ode/trunk/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java 
(original)
+++ ode/trunk/axis2/src/main/java/org/apache/ode/axis2/SoapExternalService.java 
Thu Sep 22 17:07:04 2011
@@ -338,7 +338,7 @@ public class SoapExternalService impleme
             }
             targetEPR.setSessionId(partnerSessionId);
         }
-        options.setProperty("targetSessionEndpoint", targetEPR);
+        options.setProperty(ODEService.TARGET_SESSION_ENDPOINT, targetEPR);
 
         if (myRoleWSAEPR != null) {
             WSAEndpoint myRoleEPR = new WSAEndpoint(myRoleWSAEPR);
@@ -349,7 +349,7 @@ public class SoapExternalService impleme
                 }
                 myRoleEPR.setSessionId(myRoleSessionId);
             }
-            options.setProperty("callbackSessionEndpoint", myRoleEPR);
+            options.setProperty(ODEService.CALLBACK_SESSION_ENDPOINT, 
myRoleEPR);
 
             // Map My Session ID to JMS Correlation ID
             Document callbackEprXml = 
odeMex.getMyRoleEndpointReference().toXML();

Modified: 
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionInHandler.java
URL: 
http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionInHandler.java?rev=1174267&r1=1174266&r2=1174267&view=diff
==============================================================================
--- 
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionInHandler.java 
(original)
+++ 
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionInHandler.java 
Thu Sep 22 17:07:04 2011
@@ -26,6 +26,7 @@ import org.apache.axis2.context.MessageC
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ode.axis2.ODEService;
 import org.apache.ode.utils.DOMUtils;
 import org.apache.ode.utils.Namespaces;
 import org.w3c.dom.Document;
@@ -75,7 +76,7 @@ public class SessionInHandler extends Ab
                 }
                 if (__log.isDebugEnabled())
                     __log.debug("Constructed a TO endpoint: " + 
DOMUtils.domToString(serviceEpr));
-                messageContext.setProperty("targetSessionEndpoint", 
serviceEpr);
+                messageContext.setProperty(ODEService.TARGET_SESSION_ENDPOINT, 
serviceEpr);
             }
 
             // Seeing if there's a callback, in case our client would be 
stateful as well
@@ -108,7 +109,7 @@ public class SessionInHandler extends Ab
                     }
                     if (__log.isDebugEnabled())
                         __log.debug("Constructed a CALLBACK endpoint: " + 
DOMUtils.domToString(serviceEpr));
-                    messageContext.setProperty("callbackSessionEndpoint", 
serviceEpr);
+                    
messageContext.setProperty(ODEService.CALLBACK_SESSION_ENDPOINT, serviceEpr);
                 }
             }
         }

Modified: 
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java
URL: 
http://svn.apache.org/viewvc/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java?rev=1174267&r1=1174266&r2=1174267&view=diff
==============================================================================
--- 
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java 
(original)
+++ 
ode/trunk/axis2/src/main/java/org/apache/ode/axis2/hooks/SessionOutHandler.java 
Thu Sep 22 17:07:04 2011
@@ -29,12 +29,12 @@ import org.apache.axis2.context.MessageC
 import org.apache.axis2.handlers.AbstractHandler;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ode.axis2.ODEService;
 import org.apache.ode.bpel.epr.EndpointFactory;
 import org.apache.ode.bpel.epr.MutableEndpoint;
 import org.apache.ode.bpel.epr.WSAEndpoint;
 import org.apache.ode.bpel.iapi.EndpointReference;
 import org.apache.ode.utils.Namespaces;
-import org.apache.ode.utils.Properties;
 
 /**
  * An outgoing handler adding session id information in the message
@@ -53,12 +53,12 @@ public class SessionOutHandler extends A
             return InvocationResponse.CONTINUE;
         }
 
-        EndpointReference otargetSession = (EndpointReference) 
messageContext.getProperty("targetSessionEndpoint");
-        EndpointReference ocallbackSession = (EndpointReference) 
messageContext.getProperty("callbackSessionEndpoint");
+        EndpointReference otargetSession = (EndpointReference) 
messageContext.getProperty(ODEService.TARGET_SESSION_ENDPOINT);
+        EndpointReference ocallbackSession = (EndpointReference) 
messageContext.getProperty(ODEService.CALLBACK_SESSION_ENDPOINT);
         if (otargetSession == null)
-            otargetSession = (EndpointReference) 
messageContext.getOptions().getProperty("targetSessionEndpoint");
+            otargetSession = (EndpointReference) 
messageContext.getOptions().getProperty(ODEService.TARGET_SESSION_ENDPOINT);
         if (ocallbackSession == null)
-            ocallbackSession = (EndpointReference) 
messageContext.getOptions().getProperty("callbackSessionEndpoint");
+            ocallbackSession = (EndpointReference) 
messageContext.getOptions().getProperty(ODEService.CALLBACK_SESSION_ENDPOINT);
 
         if (otargetSession != null || ocallbackSession != null) {
             SOAPHeader header = messageContext.getEnvelope().getHeader();


Reply via email to