Hi Glen, Operation context has NOTHING to do with the SOAP session , it is only the ServiceGroupContext and the ServiceContext has to store in the configuration context .
FYI : Soap session work perfectly in the branch , so that simply tell you operation context clean up has nothing do with that. As I can see your refactoring in the instance dispatcher has broken the session management. Thanks Deepal [EMAIL PROTECTED] wrote: > Author: gdaniels > Date: Thu May 24 08:11:33 2007 > New Revision: 541317 > > URL: http://svn.apache.org/viewvc?view=rev&rev=541317 > Log: > Do not clean up operation contexts when MCs are added. This was preventing > SOAP session based functionality from working. We need a better solution to > this, but for now unblock Afkham with this quick fix. Note that this will > leave OCs registered for now, and thus produce memory leakage! > > I'll be fixing/cleaning up the whole way OCs and MCs are maintained, which > affects asynchrony APIs, SOAP sessions, and general engine flow. Will post > to axis-dev with design before checkin. > > Also remove the copy of the Options from req to resp in OutInAxisOperation, > and switch over to using the static AxisEngine methods. > > Also avoid reregistering OC in AddressingBasedDispatcher, and remove the test > for isComplete() for right now. > > Modified: > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?view=diff&rev=541317&r1=541316&r2=541317 > ============================================================================== > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java > (original) > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java > Thu May 24 08:11:33 2007 > @@ -397,9 +397,9 @@ > > operationContext); > operationContext.addMessageContext(msgContext); > msgContext.setOperationContext(operationContext); > - if (operationContext.isComplete()) { > - operationContext.cleanup(); > - } > +// if (operationContext.isComplete()) { > +// operationContext.cleanup(); > +// } > } > > public void registerMessageContext(MessageContext msgContext, > @@ -407,9 +407,9 @@ > msgContext.setAxisOperation(this); > operationContext.addMessageContext(msgContext); > msgContext.setOperationContext(operationContext); > - if (operationContext.isComplete()) { > - operationContext.cleanup(); > - } > +// if (operationContext.isComplete()) { > +// operationContext.cleanup(); > +// } > } > > /** > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=541317&r1=541316&r2=541317 > ============================================================================== > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java > (original) > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java > Thu May 24 08:11:33 2007 > @@ -303,7 +303,6 @@ > } > } > > - > /** > * @param msgctx > * @return Returns MessageContext. > @@ -319,8 +318,7 @@ > msgctx.getConfigurationContext().createMessageContext(); > > // This is a hack - Needs to change > - responseMessageContext.setOptions(options); > - > +// responseMessageContext.setOptions(options); > > responseMessageContext.setServerSide(false); > responseMessageContext.setMessageID(msgctx.getMessageID()); > @@ -331,6 +329,16 @@ > > //sending the message > engine.send(msgctx); > + > +// // By now we should have a new MessageContext in the IN message > +// OperationContext operation = msgctx.getOperationContext(); > +// MessageContext response = > operation.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); > +// if (response == null) { > +// // Nothing! > +// throw new AxisFault("No response message!"); > +// } > +// engine.receive(response); > + > responseMessageContext.setDoingREST(msgctx.isDoingREST()); > > responseMessageContext.setProperty(MessageContext.TRANSPORT_IN, > msgctx > @@ -348,9 +356,9 @@ > /* > * old code here was using the outbound message context to set > the inbound SOAP namespace, > * as such and passing it to TransportUtils.createSOAPMessage > - * > + * > * msgctx.getEnvelope().getNamespace().getNamespaceURI() > - * > + * > * However, the SOAP1.2 spec, appendix A indicates that if a > SOAP1.2 message is sent to a SOAP1.1 > * endpoint, we will get a SOAP1.1 (fault) message response. We > need another way to set > * the inbound SOAP version. Best way to do this is to trust > the content type and let > @@ -366,8 +374,7 @@ > } > SOAPEnvelope resenvelope = responseMessageContext.getEnvelope(); > if (resenvelope != null) { > - engine = new AxisEngine(msgctx.getConfigurationContext()); > - engine.receive(responseMessageContext); > + AxisEngine.receive(responseMessageContext); > if (responseMessageContext.getReplyTo() != null) { > sc.setTargetEPR(responseMessageContext.getReplyTo()); > } > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java?view=diff&rev=541317&r1=541316&r2=541317 > ============================================================================== > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java > (original) > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java > Thu May 24 08:11:33 2007 > @@ -142,17 +142,20 @@ > .getOperationContext(relatesTo); > > if (operationContext != null) { > - if(operationContext.isComplete()){ > - // If the dispatch happens because of the RelatesTo > and the mep is complete > - // we should throw a more descriptive fault. > - throw new > AxisFault(Messages.getMessage("duplicaterelatesto",relatesTo)); > - } > +// if(operationContext.isComplete()){ > +// // If the dispatch happens because of the > RelatesTo and the mep is complete > +// // we should throw a more descriptive fault. > +// throw new > AxisFault(Messages.getMessage("duplicaterelatesto",relatesTo)); > +// } > > msgctx.setAxisOperation(operationContext.getAxisOperation()); > msgctx.setOperationContext(operationContext); > msgctx.setServiceContext((ServiceContext) > operationContext.getParent()); > msgctx.setAxisService( > ((ServiceContext) > operationContext.getParent()).getAxisService()); > - msgctx.getAxisOperation().registerMessageContext(msgctx, > operationContext); > + > + // TODO : Is this necessary here? > +// > msgctx.getAxisOperation().registerMessageContext(msgctx, operationContext); > + > msgctx.setServiceGroupContextId( > ((ServiceGroupContext) > msgctx.getServiceContext().getParent()).getId()); > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- Thanks, Deepal ................................................................ "The highest tower is built one brick at a time" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
