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 di...@apache.org on 2005/12/25 18:34:58 UTC
svn commit: r358992 - in /webservices/axis2/trunk/java/modules:
core/src/org/apache/axis2/ core/src/org/apache/axis2/context/
core/src/org/apache/axis2/description/ core/src/org/apache/axis2/util/
integration/test/org/apache/axis2/engine/
Author: dims
Date: Sun Dec 25 09:34:50 2005
New Revision: 358992
URL: http://svn.apache.org/viewcvs?rev=358992&view=rev
Log:
- default scope should be SCOPE_REQUEST (*NO* Servicegroup stuff on the wire)
- Fix typo in constant (SCOPES_SOAP_SESSION -> SCOPE_SOAP_SESSION)
- Fix ServiceGroupContextTest test to get it working (set the scope explicitly to transport)
NOTE: Please make sure a simple generated web service / client interaction does not have any session stuff. We've been through this before (please see SteveL's old post)
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/SessionUtils.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceGroupContextTest.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=358992&r1=358991&r2=358992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Sun Dec 25 09:34:50 2005
@@ -71,7 +71,7 @@
* Field APPLICATION_SCOPE
*/
public static final String SCOPE_APPLICATION = "application";
- public static final String SCOPES_SOAP_SESSION = "soapsession";
+ public static final String SCOPE_SOAP_SESSION = "soapsession";
public static final String SCOPE_TRANSPORT_SESSION = "transportsession";
public static final String SCOPE_REQUEST = "request";
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java?rev=358992&r1=358991&r2=358992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java Sun Dec 25 09:34:50 2005
@@ -119,15 +119,19 @@
if (Constants.SCOPE_APPLICATION.equals(maxScope)) {
//todo : needed to add to two tables
registerServiceGroupContext(serviceGroupContext);
- } else if (Constants.SCOPES_SOAP_SESSION.equals(maxScope)) {
+ } else if (Constants.SCOPE_SOAP_SESSION.equals(maxScope)) {
//todo : needed to add to two tables
registerServiceGroupContext(serviceGroupContext);
- } else {
+ } else if (Constants.SCOPE_TRANSPORT_SESSION.equals(maxScope)) {
sessionContext.addServiceGroupContext(serviceGroupContext, serviceGroupContextId);
sessionContext.addServiceContext(serviceContext);
}
messageContext.setServiceContext(serviceContext);
- messageContext.setServiceGroupContext(serviceGroupContext);
+ if(Constants.SCOPE_REQUEST.equals(maxScope)) {
+ messageContext.setServiceGroupContextId(null);
+ } else {
+ messageContext.setServiceGroupContext(serviceGroupContext);
+ }
}
// when you come here operation context MUST already been assigned to the message context
serviceContext.setProperty(Constants.COOKIE_STRING, sessionContext.getCookieID());
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=358992&r1=358991&r2=358992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java Sun Dec 25 09:34:50 2005
@@ -90,8 +90,8 @@
this.paramterInclude = new ParameterIncludeImpl();
this.operationsAliasesMap = new HashMap();
moduleConfigmap = new HashMap();
- //by dafault service scop is TranportSession
- scope = Constants.SCOPE_TRANSPORT_SESSION;
+ //by dafault service scope is for the request
+ scope = Constants.SCOPE_REQUEST;
messageReceivers = new HashMap();
}
@@ -628,7 +628,7 @@
public void setScope(String scope) {
if (Constants.SCOPE_APPLICATION.equals(scope) ||
Constants.SCOPE_TRANSPORT_SESSION.equals(scope) ||
- Constants.SCOPES_SOAP_SESSION.equals(scope) ||
+ Constants.SCOPE_SOAP_SESSION.equals(scope) ||
Constants.SCOPE_REQUEST.equals(scope)) {
this.scope = scope;
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/SessionUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/SessionUtils.java?rev=358992&r1=358991&r2=358992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/SessionUtils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/SessionUtils.java Sun Dec 25 09:34:50 2005
@@ -54,7 +54,7 @@
return 1;
} else if (Constants.SCOPE_TRANSPORT_SESSION.equals(scope)) {
return 2;
- } else if (Constants.SCOPES_SOAP_SESSION.equals(scope)) {
+ } else if (Constants.SCOPE_SOAP_SESSION.equals(scope)) {
return 3;
} else if (Constants.SCOPE_APPLICATION.equals(scope)) {
return 4;
@@ -78,7 +78,7 @@
return Constants.SCOPE_TRANSPORT_SESSION;
}
case 3 : {
- return Constants.SCOPES_SOAP_SESSION;
+ return Constants.SCOPE_SOAP_SESSION;
}
case 4 : {
return Constants.SCOPE_APPLICATION;
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceGroupContextTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceGroupContextTest.java?rev=358992&r1=358991&r2=358992&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceGroupContextTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceGroupContextTest.java Sun Dec 25 09:34:50 2005
@@ -65,6 +65,7 @@
UtilServer.start();
service = Utils.createSimpleService(serviceName, new RequestCounterMessageReceiver(),
RequestCounter.class.getName(), operationName);
+ service.setScope(Constants.SCOPE_TRANSPORT_SESSION);
UtilServer.deployService(service);
}
Re: svn commit: r358992 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/description/ core/src/org/apache/axis2/util/ integration/test/org/apache/axis2/engine/
Posted by Davanum Srinivas <da...@gmail.com>.
Let's put this to a VOTE then!
On 12/25/05, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Sun, 2005-12-25 at 17:34 +0000, dims@apache.org wrote:
> > Author: dims
> > Date: Sun Dec 25 09:34:50 2005
> > New Revision: 358992
> >
> > URL: http://svn.apache.org/viewcvs?rev=358992&view=rev
> > Log:
> > - default scope should be SCOPE_REQUEST (*NO* Servicegroup stuff on the wire)
>
> -1: The default should be SCOPE_TRANSPORT_SESSION. That way if using
> HTTP you get sessions by default, which is exactly what happens in
> browsers with servlets etc..
>
> Sanjiva.
>
>
>
>
--
Davanum Srinivas : http://wso2.com/blogs/
Re: svn commit: r358992 - in
/webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/
core/src/org/apache/axis2/context/ core/src/org/apache/axis2/description/
core/src/org/apache/axis2/util/ integration/test/org/apache/axis2/engine/
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, 2005-12-25 at 17:34 +0000, dims@apache.org wrote:
> Author: dims
> Date: Sun Dec 25 09:34:50 2005
> New Revision: 358992
>
> URL: http://svn.apache.org/viewcvs?rev=358992&view=rev
> Log:
> - default scope should be SCOPE_REQUEST (*NO* Servicegroup stuff on the wire)
-1: The default should be SCOPE_TRANSPORT_SESSION. That way if using
HTTP you get sessions by default, which is exactly what happens in
browsers with servlets etc..
Sanjiva.
Re: svn commit: r358992 - in
/webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/
core/src/org/apache/axis2/context/ core/src/org/apache/axis2/description/
core/src/org/apache/axis2/util/ integration/test/org/apache/axis2/engine/
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, 2005-12-25 at 17:34 +0000, dims@apache.org wrote:
> Author: dims
> Date: Sun Dec 25 09:34:50 2005
> New Revision: 358992
>
> URL: http://svn.apache.org/viewcvs?rev=358992&view=rev
> Log:
> - default scope should be SCOPE_REQUEST (*NO* Servicegroup stuff on the wire)
-1: The default should be SCOPE_TRANSPORT_SESSION. That way if using
HTTP you get sessions by default, which is exactly what happens in
browsers with servlets etc..
Sanjiva.