From sandeshajasonweaver@example.org Sat Sep 01 12:34:54 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 16431 invoked from network); 1 Sep 2007 12:34:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2007 12:34:51 -0000 Received: (qmail 99323 invoked by uid 500); 1 Sep 2007 12:34:46 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 99259 invoked by uid 500); 1 Sep 2007 12:34:46 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 99248 invoked by uid 99); 1 Sep 2007 12:34:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Sep 2007 05:34:46 -0700 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=HTML_MESSAGE,MIME_HTML_ONLY,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasonweaver@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO bay0-omc2-s8.bay0.hotmail.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Sep 2007 12:34:40 +0000 Received: from hotmail.com ([83.161.120.155]) by bay0-omc2-s8.bay0.hotmail.com with Microsoft SMTPSVC463-721-4154); Sat, 1 Sep 2007 05:34:20 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 1 Sep 2007 05:34:19 -0700 Message-ID: <jasonweaver@example.org> Received: from 83.161.120.155 by by120fd.bay120.hotmail.msn.com with HTTP; Sat, 01 Sep 2007 12:34:15 GMT X-Originating-IP: [83.161.120.155] X-Originating-Email: [jasonweaver@example.org] X-Sender: jasonweaver@example.org From: "JoseMiguel Besada" <jasonweaver@example.org> To: jasonweaver@example.org Subject: Problems with a ADB Client and sandesha2 Date: Sat, 01 Sep 2007 12:34:15 +0000 Mime-Version: 1.0 Content-Type: text/html; format=flowed X-OriginalArrivalTime: 01 Sep 2007 12:34:19.0724 (UTC) FILETIME=[6AF710C0:01C7EC94] X-Virus-Checked: Checked by ClamAV on apache.org <html><div style='background-color:'><P><BR><BR></P><BR>Hello, <P>I'm trying to integrate a ADB Client (Axis2 1.2) with the module Sandesha2. When i do the&nbsp;call to the stub&nbsp;&nbsp;i receive the following exception:</P> <P><FONT size=2>&nbsp;</P> <P align=left>&nbsp;Sandesha2 sender thread has not received a valid synchronous response.</P></FONT><U><FONT color=#000080 size=2> <P align=left>java.lang.NullPointerException</P></U></FONT><FONT size=2> <P align=left>at org.apache.axis2.engine.HTTPLocationBasedDispatcher.findOperation(</FONT><U><FONT color=#000080 size=2>HTTPLocationBasedDispatcher.java:51</U></FONT><FONT size=2>)</P> <P align=left>at org.apache.axis2.engine.AbstractDispatcher.invoke(</FONT><U><FONT color=#000080 size=2>AbstractDispatcher.java:100</U></FONT><FONT size=2>)</P> <P align=left>at org.apache.axis2.engine.Phase.invoke(</FONT><U><FONT color=#000080 size=2>Phase.java:383</U></FONT><FONT size=2>)</P> <P align=left>at org.apache.axis2.engine.AxisEngine.invoke(</FONT><U><FONT color=#000080 size=2>AxisEngine.java:203</U></FONT><FONT size=2>)</P> <P align=left>at org.apache.axis2.engine.AxisEngine.receive(</FONT><U><FONT color=#000080 size=2>AxisEngine.java:131</U></FONT><FONT size=2>)</P> <P align=left>at org.apache.sandesha2.workers.SenderWorker.checkForSyncResponses(</FONT><U><FONT color=#000080 size=2>SenderWorker.java:655</U></FONT><FONT size=2>)</P> <P align=left>at org.apache.sandesha2.workers.SenderWorker.run(</FONT><U><FONT color=#000080 size=2>SenderWorker.java:341</U></FONT><FONT size=2>)</P> <P align=left>at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(</FONT><U><FONT color=#000080 size=2>ThreadPoolExecutor.java:665</U></FONT><FONT size=2>)</P> <P align=left>at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(</FONT><U><FONT color=#000080 size=2>ThreadPoolExecutor.java:690</U></FONT><FONT size=2>)</P> <P align=left>at java.lang.Thread.run(Unknown Source)</P> <P></FONT><BR><FONT size=2>Any ideas about the problem?</FONT></P> <P><FONT size=2></FONT>&nbsp;</P> <P>Regards</P><BR><BR> <DIV> <P>&nbsp;</P> <P> <P></P> <DIV> <DIV> <DIV>&nbsp;</DIV></DIV></DIV></DIV> <DIV><FONT color=#000000></DIV></FONT></div><br clear=all><hr>FREE pop-up blocking with the new MSN Toolbar <a href="http://g.msn.com/8HMBEN/2755??PS=47575" target="_top">MSN Toolbar</a> Get it now!</html> --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Tue Sep 04 10:03:56 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 37514 invoked from network); 4 Sep 2007 10:03:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Sep 2007 10:03:53 -0000 Received: (qmail 6574 invoked by uid 500); 4 Sep 2007 10:03:47 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 6518 invoked by uid 500); 4 Sep 2007 10:03:46 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 6507 invoked by uid 500); 4 Sep 2007 10:03:46 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 6504 invoked by uid 99); 4 Sep 2007 10:03:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 03:03:46 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 10:05:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4A0B21A9832; Tue, 4 Sep 2007 03:03:29 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r572599 - /webservices/sandesha/branches/sandesha2/java/1_3/modules/rampart-integration/pom.xml Date: Tue, 04 Sep 2007 10:03:28 -0000 To: jasonweaver@example.org From: jasonweaver@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jasonweaver@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ruchithf Date: Tue Sep 4 03:03:25 2007 New Revision: 572599 URL: http://svn.apache.org/viewvc?rev=572599&view=rev Log: Updated rampart and wss4j versions Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/rampart-integration/pom.xml Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/rampart-integration/pom.xml URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/rampart-integration/pom.xml?rev=572599&r1=572598&r2=572599&view=diff ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/rampart-integration/pom.xml (original) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/rampart-integration/pom.xml Tue Sep 4 03:03:25 2007 @@ -70,8 +70,8 @@ </dependencies> <properties> - <rampart.version>SNAPSHOT</rampart.version> - <wss4j.version>1.5.2</wss4j.version> + <rampart.version>1.3</rampart.version> + <wss4j.version>1.5.3</wss4j.version> </properties> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Thu Sep 06 12:28:59 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 99292 invoked from network); 6 Sep 2007 12:28:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Sep 2007 12:28:55 -0000 Received: (qmail 5291 invoked by uid 500); 6 Sep 2007 12:28:50 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 5227 invoked by uid 500); 6 Sep 2007 12:28:49 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 5215 invoked by uid 99); 6 Sep 2007 12:28:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 05:28:49 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 12:30:14 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 51FAE714187 for <jasonweaver@example.org>; Thu, 6 Sep 2007 05:28:32 -0700 (PDT) Message-ID: <11945760.1189081712289.JavaMail.jira@brutus> Date: Thu, 6 Sep 2007 05:28:32 -0700 (PDT) From: "Thomas McKiernan (JIRA)" <jasonweaver@example.org> To: jasonweaver@example.org Subject: [jira] Created: (SANDESHA2-120) Mechanism for decorating EPRs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Mechanism for decorating EPRs ----------------------------- Key: SANDESHA2-120 URL: https://issues.apache.org/jira/browse/SANDESHA2-120 Project: Sandesha2 Issue Type: Improvement Reporter: Thomas McKiernan EPRs such as replyTo can be used to convey routing information etc. I propose a mechanism to allow users to plug-in code that decorates EPRs with extra information at various points in the code -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Thu Sep 06 12:34:33 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 1415 invoked from network); 6 Sep 2007 12:34:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Sep 2007 12:34:32 -0000 Received: (qmail 24883 invoked by uid 500); 6 Sep 2007 12:34:26 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 24685 invoked by uid 500); 6 Sep 2007 12:34:26 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 24674 invoked by uid 500); 6 Sep 2007 12:34:26 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 24671 invoked by uid 99); 6 Sep 2007 12:34:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 05:34:26 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 12:34:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 44D231A9832; Thu, 6 Sep 2007 05:34:10 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r573243 - in /webservices/sandesha/trunk/java/modules: core/src/main/java/org/apache/sandesha2/ core/src/main/java/org/apache/sandesha2/i18n/ core/src/main/java/org/apache/sandesha2/policy/ core/src/main/java/org/apache/sandesha2/policy/bui... Date: Thu, 06 Sep 2007 12:34:08 -0000 To: jasonweaver@example.org From: jasonweaver@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jasonweaver@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mckierna Date: Thu Sep 6 05:34:04 2007 New Revision: 573243 URL: http://svn.apache.org/viewvc?rev=573243&view=rev Log: SANDESHA2-120 : plugin to decorate replyTo EPRs Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/PropertyManager.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties webservices/sandesha/trunk/java/modules/mar/module.xml Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/Sandesha2Constants.java Thu Sep 6 05:34:04 2007 @@ -420,6 +420,8 @@ public static final String RetransmissionCount = "RetransmissionCount"; + public static final String EPRDecorator = "EPRDecorator"; + public static final String SecurityManager = "SecurityManager"; public static final String ContextManager = "ContextManager"; @@ -460,6 +462,8 @@ public static final int MaximumRetransmissionCount = 10; + public static final String EPRDecorator = "org.apache.sandesha2.addressing.EPRDecoratorImpl"; + public static final String SecurityManager = "org.apache.sandesha2.security.dummy.DummySecurityManager"; public static final String ContextManager = "org.apache.sandesha2.context.DummyContextManager"; @@ -544,6 +548,8 @@ static final String SECURITY_MANAGER = "Sandesha2SecurityManager"; + static final String EPR_DECORATOR = "Sandesha2EPRDecorator"; + static final String CONTEXT_MANAGER = "Sandesha2ContextManager"; static final String RETRANSMITTABLE_PHASES = "RMRetransmittablePhases"; @@ -608,6 +614,7 @@ public static final String ELEM_MSG_TYPES_TO_DROP = "MessageTypesToDrop"; public static final String ELEM_STORAGE_MGR = "StorageManagers"; public static final String ELEM_SEC_MGR = "SecurityManager"; + public static final String ELEM_EPR_DECORATOR = "EPRDecorator"; public static final String ELEM_CONTEXT_MGR = "ContextManager"; public static final String ELEM_INMEMORY_STORAGE_MGR = "InMemoryStorageManager"; public static final String ELEM_PERMANENT_STORAGE_MGR = "PermanentStorageManager"; @@ -632,6 +639,7 @@ public static final QName Q_ELEM_MSG_TYPES_TO_DROP = new QName(URI_RM_POLICY_NS, ELEM_MSG_TYPES_TO_DROP, ATTR_WSRM); public static final QName Q_ELEM_STORAGE_MGR =new QName(URI_RM_POLICY_NS, ELEM_STORAGE_MGR, ATTR_WSRM); public static final QName Q_ELEM_SEC_MGR = new QName(URI_RM_POLICY_NS, ELEM_SEC_MGR, ATTR_WSRM); + public static final QName Q_ELEM_EPR_DECORATOR = new QName(URI_RM_POLICY_NS, ELEM_EPR_DECORATOR, ATTR_WSRM); public static final QName Q_ELEM_CONTEXT_MGR = new QName(URI_RM_POLICY_NS, ELEM_CONTEXT_MGR, ATTR_WSRM); public static final QName Q_ELEM_INMEMORY_STORAGE_MGR =new QName(URI_RM_POLICY_NS, ELEM_INMEMORY_STORAGE_MGR, ATTR_WSRM); public static final QName Q_ELEM_PERMANENT_STORAGE_MGR =new QName(URI_RM_POLICY_NS, ELEM_PERMANENT_STORAGE_MGR, ATTR_WSRM); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/i18n/SandeshaMessageKeys.java Thu Sep 6 05:34:04 2007 @@ -27,7 +27,9 @@ public static final String cannotGetStorageManager="cannotGetStorageManager"; public static final String storageManagerMustImplement="storageManagerMustImplement"; public static final String cannotInitSecurityManager="cannotInitSecurityManager"; + public static final String cannotInitEPRDecorator="cannotInitEPRDecorator"; public static final String securityManagerMustImplement="securityManagerMustImplement"; + public static final String eprDecoratorMustImplement="eprDecoratorMustImplement"; public static final String cannotInitContextManager="cannotInitContextManager"; public static final String contextManagerMustImplement="contextManagerMustImplement"; public static final String cannotFindModulePolicies="cannotFindModulePolicies"; Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/SandeshaPolicyBean.java Thu Sep 6 05:34:04 2007 @@ -52,6 +52,8 @@ private String permanentStorageManagerClass = null; private String securityManagerClass = null; + + private String eprDecoratorClass = null; private String contextManagerClass = null; @@ -214,6 +216,14 @@ this.securityManagerClass = className; } + public String getEPRDecoratorClass(){ + return eprDecoratorClass; + } + + public void setEPRDecoratorClass(String className) { + this.eprDecoratorClass = className; + } + public String getContextManagerClass() { return contextManagerClass; } @@ -343,6 +353,11 @@ // <wsrm:SecurityManager /> writer.writeStartElement(prefix, Sandesha2Constants.Assertions.Q_ELEM_SEC_MGR.getLocalPart(), namespaceURI); writer.writeCharacters(getSecurityManagerClass()); + writer.writeEndElement(); + + //<wsrm:EPRDecorator /> + writer.writeStartElement(prefix, Sandesha2Constants.Assertions.Q_ELEM_EPR_DECORATOR.getLocalPart(), namespaceURI); + writer.writeCharacters(getEPRDecoratorClass()); writer.writeEndElement(); //<wsrm:ContextManager /> Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/policy/builders/RMAssertionBuilder.java Thu Sep 6 05:34:04 2007 @@ -124,9 +124,11 @@ } else if (Sandesha2Constants.Assertions.ELEM_SEC_MGR .equals(name)) { propertyBean.setSecurityManagerClass (element.getText().trim()); - } else if (Sandesha2Constants.Assertions.ELEM_STORAGE_MGR + } + else if (Sandesha2Constants.Assertions.ELEM_EPR_DECORATOR.equals(name)) { + propertyBean.setEPRDecoratorClass(element.getText().trim()); + } else if (Sandesha2Constants.Assertions.ELEM_STORAGE_MGR .equals(name)) { - if (element!=null) { //finding out storage managers. Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/PropertyManager.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/PropertyManager.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/PropertyManager.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/PropertyManager.java Thu Sep 6 05:34:04 2007 @@ -65,6 +65,7 @@ loadMessageTypesToDrop(msgTypesToDrop, propertyBean); propertyBean.setSecurityManagerClass(Sandesha2Constants.Properties.DefaultValues.SecurityManager); + propertyBean.setEPRDecoratorClass(Sandesha2Constants.Properties.DefaultValues.EPRDecorator); propertyBean.setContextManagerClass(Sandesha2Constants.Properties.DefaultValues.ContextManager); propertyBean.setEnableMakeConnection(Sandesha2Constants.Properties.DefaultValues.EnableMakeConnection); propertyBean.setEnableRMAnonURI(Sandesha2Constants.Properties.DefaultValues.EnableRMAnonURI); @@ -133,6 +134,9 @@ .getProperty(Sandesha2Constants.Properties.SecurityManager); loadSecurityManagerClass(securityManagerClassStr,propertyBean); + String eprDecoratorParam = properties.getProperty(Sandesha2Constants.Properties.EPRDecorator); + loadEPRDecoratorClass(eprDecoratorParam,propertyBean); + String contextManagerClassStr = properties.getProperty(Sandesha2Constants.Properties.ContextManager); loadContextManagerClass(contextManagerClassStr,propertyBean); @@ -206,6 +210,10 @@ Parameter securityManagerClassParam = desc.getParameter(Sandesha2Constants.Properties.SecurityManager); String securityManagerClassStr = (String) securityManagerClassParam.getValue(); loadSecurityManagerClass(securityManagerClassStr,propertyBean); + + Parameter eprDecoratorClassParam = desc.getParameter(Sandesha2Constants.Properties.EPRDecorator); + String eprDecoratorClassString = (String) eprDecoratorClassParam.getValue(); + loadEPRDecoratorClass(eprDecoratorClassString,propertyBean); return propertyBean; } @@ -492,6 +500,18 @@ } + /** + * Loads the EPR decorator class name. + * + * @param properties + */ + private static void loadEPRDecoratorClass(String eprDecoratorClassStr, SandeshaPolicyBean propertyBean) { + if (eprDecoratorClassStr != null) { + eprDecoratorClassStr = eprDecoratorClassStr.trim(); + propertyBean.setEPRDecoratorClass(eprDecoratorClassStr); + } + } + /** * Loads the SecurityManager class name. * Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java Thu Sep 6 05:34:04 2007 @@ -208,6 +208,7 @@ if(replyTo != null) { EndpointReference replyToEPR = new EndpointReference(replyTo); + replyToEPR = SandeshaUtil.getEPRDecorator(createSeqRMMsg.getConfigurationContext()).decorateEndpointReference(replyToEPR); createSeqRMMsg.setReplyTo(replyToEPR); } Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java Thu Sep 6 05:34:04 2007 @@ -17,18 +17,14 @@ package org.apache.sandesha2.util; -import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.PrintWriter; -import java.io.UnsupportedEncodingException; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.apache.axiom.om.OMElement; @@ -66,6 +62,7 @@ import org.apache.sandesha2.RMMsgContext; import org.apache.sandesha2.Sandesha2Constants; import org.apache.sandesha2.SandeshaException; +import org.apache.sandesha2.addressing.EPRDecorator; import org.apache.sandesha2.client.SandeshaClientConstants; import org.apache.sandesha2.context.ContextManager; import org.apache.sandesha2.i18n.SandeshaMessageHelper; @@ -758,6 +755,52 @@ return util; } + public static EPRDecorator getEPRDecorator(ConfigurationContext context) throws SandeshaException { + EPRDecorator decorator = null; + AxisConfiguration config = context.getAxisConfiguration(); + Parameter p = config.getParameter(Sandesha2Constants.EPR_DECORATOR); + if(p != null) decorator = (EPRDecorator) p.getValue(); + if (decorator != null) return decorator; + + try { + //Currently module policies are used to find the decorator impl. These cant be overriden + String decoratorClassStr = getDefaultPropertyBean(context.getAxisConfiguration()).getEPRDecoratorClass(); + decorator = getEPRDecoratorInstance(decoratorClassStr,context); + p = new Parameter(Sandesha2Constants.EPR_DECORATOR,decorator); + config.addParameter(p); + } catch(AxisFault e) { + String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotInitEPRDecorator, e.toString()); + throw new SandeshaException(message,e); + } + return decorator; +} + + private static EPRDecorator getEPRDecoratorInstance (String className,ConfigurationContext context) throws SandeshaException { + try { + ClassLoader classLoader = null; + AxisConfiguration config = context.getAxisConfiguration(); + Parameter classLoaderParam = config.getParameter(Sandesha2Constants.MODULE_CLASS_LOADER); + if(classLoaderParam != null) classLoader = (ClassLoader) classLoaderParam.getValue(); + if (classLoader==null) + throw new SandeshaException (SandeshaMessageHelper.getMessage(SandeshaMessageKeys.classLoaderNotFound)); + + Class c = classLoader.loadClass(className); + Class configContextClass = context.getClass(); + + Constructor constructor = c.getConstructor(new Class[] { configContextClass }); + Object obj = constructor.newInstance(new Object[] {context}); + if (!(obj instanceof EPRDecorator)) { + String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.eprDecoratorMustImplement, className); + throw new SandeshaException(message); + } + return (EPRDecorator) obj; + + } catch (Exception e) { + String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.cannotInitEPRDecorator, e.toString()); + throw new SandeshaException(message,e); + } + } + private static SecurityManager getSecurityManagerInstance (String className,ConfigurationContext context) throws SandeshaException { try { ClassLoader classLoader = null; Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java Thu Sep 6 05:34:04 2007 @@ -231,6 +231,15 @@ } } + //try to redecorate the EPR if necessary + if (log.isDebugEnabled()) + log.debug("Redecorate EPR : " + msgCtx.getEnvelope().getHeader()); + EndpointReference replyToEPR = msgCtx.getReplyTo(); + if(replyToEPR!=null){ + replyToEPR = SandeshaUtil.getEPRDecorator(msgCtx.getConfigurationContext()).decorateEndpointReference(replyToEPR); + msgCtx.setReplyTo(replyToEPR); + } + // have to commit the transaction before sending. This may // get changed when WS-AT is available. if(transaction != null) { Modified: webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties Thu Sep 6 05:34:04 2007 @@ -28,6 +28,8 @@ storageManagerMustImplement=StorageManager {0} must implement the org.apache.sandesha2.storage.StorageManager interface. cannotInitSecurityManager=Cannot initialize the given security manager due to exception {0}. securityManagerMustImplement=SecurityManager {0} must implement the org.apache.sandesha2.storage.StorageManager interface. +cannotInitEPRDecorator=Cannot initialize the given epr decorator due to exception {0}. +eprDecoratorMustImplement=EPRDecorator {0} must implement the org.apache.sandesha2.addressing.EPRDecorator interface. cannotInitContextManager=Cannot initialize the given context manager due to exception {0}. contextManagerMustImplement=ContextManager {0} must implement the org.apache.sandesha2.context.ContextManager interface. cannotFindModulePolicies=No policies were found in the module.xml at the module initiation time. Modified: webservices/sandesha/trunk/java/modules/mar/module.xml URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/mar/module.xml?rev=573243&r1=573242&r2=573243&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/mar/module.xml (original) +++ webservices/sandesha/trunk/java/modules/mar/module.xml Thu Sep 6 05:34:04 2007 @@ -135,6 +135,7 @@ <!-- This will not be overriden by service level policies --> <sandesha2:SecurityManager>org.apache.sandesha2.security.dummy.DummySecurityManager</sandesha2:SecurityManager> <sandesha2:ContextManager>org.apache.sandesha2.context.DummyContextManager</sandesha2:ContextManager> + <sandesha2:EPRDecorator>org.apache.sandesha2.addressing.EPRDecoratorImpl</sandesha2:EPRDecorator> <sandesha2:MakeConnection> <sandesha2:Enabled>true</sandesha2:Enabled> --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Thu Sep 06 12:38:59 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 2392 invoked from network); 6 Sep 2007 12:38:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Sep 2007 12:38:56 -0000 Received: (qmail 34642 invoked by uid 500); 6 Sep 2007 12:38:50 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 34580 invoked by uid 500); 6 Sep 2007 12:38:50 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 34569 invoked by uid 99); 6 Sep 2007 12:38:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 05:38:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 12:40:13 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 15296714187 for <jasonweaver@example.org>; Thu, 6 Sep 2007 05:38:32 -0700 (PDT) Message-ID: <6477497.1189082312066.JavaMail.jira@brutus> Date: Thu, 6 Sep 2007 05:38:32 -0700 (PDT) From: "Thomas McKiernan (JIRA)" <jasonweaver@example.org> To: jasonweaver@example.org Subject: [jira] Closed: (SANDESHA2-120) Mechanism for decorating EPRs In-Reply-To: <11945760.1189081712289.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SANDESHA2-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas McKiernan closed SANDESHA2-120. -------------------------------------- Resolution: Fixed Fixed in revision 573243 > Mechanism for decorating EPRs > ----------------------------- > > Key: SANDESHA2-120 > URL: https://issues.apache.org/jira/browse/SANDESHA2-120 > Project: Sandesha2 > Issue Type: Improvement > Reporter: Thomas McKiernan > > EPRs such as replyTo can be used to convey routing information etc. I propose a mechanism to allow users to plug-in code that decorates EPRs with extra information at various points in the code -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Thu Sep 06 12:39:42 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 2697 invoked from network); 6 Sep 2007 12:39:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Sep 2007 12:39:40 -0000 Received: (qmail 36986 invoked by uid 500); 6 Sep 2007 12:39:33 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 36924 invoked by uid 500); 6 Sep 2007 12:39:33 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 36913 invoked by uid 500); 6 Sep 2007 12:39:33 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 36910 invoked by uid 99); 6 Sep 2007 12:39:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 05:39:33 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 12:40:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7788D1A9832; Thu, 6 Sep 2007 05:39:15 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r573244 - in /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing: ./ EPRDecorator.java EPRDecoratorImpl.java Date: Thu, 06 Sep 2007 12:39:12 -0000 To: jasonweaver@example.org From: jasonweaver@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jasonweaver@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mckierna Date: Thu Sep 6 05:39:11 2007 New Revision: 573244 URL: http://svn.apache.org/viewvc?rev=573244&view=rev Log: SANDESHA2-120 : plugin to decorate replyTo EPRs Added: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecorator.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecoratorImpl.java Added: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecorator.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecorator.java?rev=573244&view=auto ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecorator.java (added) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecorator.java Thu Sep 6 05:39:11 2007 @@ -0,0 +1,37 @@ +/* + * Copyright 1999-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.sandesha2.addressing; + +import org.apache.axis2.addressing.EndpointReference; +import org.apache.axis2.context.ConfigurationContext; + +public abstract class EPRDecorator { + + final ConfigurationContext ctx; + + public EPRDecorator(ConfigurationContext configCtx){ + this.ctx = configCtx; + } + + /** + * Decorates the endpoint reference with any additional routing information required + * @param ref + * @return + */ + public abstract EndpointReference decorateEndpointReference(EndpointReference ref); + +} Added: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecoratorImpl.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecoratorImpl.java?rev=573244&view=auto ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecoratorImpl.java (added) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/addressing/EPRDecoratorImpl.java Thu Sep 6 05:39:11 2007 @@ -0,0 +1,35 @@ +/* + * Copyright 1999-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.sandesha2.addressing; + +import org.apache.axis2.addressing.EndpointReference; +import org.apache.axis2.context.ConfigurationContext; + +public class EPRDecoratorImpl extends EPRDecorator{ + + + public EPRDecoratorImpl(ConfigurationContext ctx){ + super(ctx); + } + + + public EndpointReference decorateEndpointReference(EndpointReference ref){ + //NO-OP + return ref; + } + +} --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Sun Sep 09 17:50:54 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 9071 invoked from network); 9 Sep 2007 17:50:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Sep 2007 17:50:53 -0000 Received: (qmail 55973 invoked by uid 500); 9 Sep 2007 17:50:46 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 55924 invoked by uid 500); 9 Sep 2007 17:50:46 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 55913 invoked by uid 99); 9 Sep 2007 17:50:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2007 10:50:46 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2007 17:52:20 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 1BC3371420A for <jasonweaver@example.org>; Sun, 9 Sep 2007 10:50:30 -0700 (PDT) Message-ID: <10819239.1189360230105.JavaMail.jira@brutus> Date: Sun, 9 Sep 2007 10:50:30 -0700 (PDT) From: "Chamikara Jayalath (JIRA)" <jasonweaver@example.org> To: jasonweaver@example.org Subject: [jira] Commented: (SANDESHA2-119) InactivityTimeout - default 60sec is a bit optimistic for mailtransport In-Reply-To: <6837622.1188308131180.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SANDESHA2-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526018 ] Chamikara Jayalath commented on SANDESHA2-119: ---------------------------------------------- Due to a limitation in the implementation InactivityTimeout will only be loaded from the system level. So for now please change the module.xml. > InactivityTimeout - default 60sec is a bit optimistic for mailtransport > ----------------------------------------------------------------------- > > Key: SANDESHA2-119 > URL: https://issues.apache.org/jira/browse/SANDESHA2-119 > Project: Sandesha2 > Issue Type: Bug > Environment: Sandesha2 1_3 > Reporter: Hans G Knudsen > Attachments: inactivity_timeout.txt > > > Default InactivityTimeout == 60 sec seems a bit optimistic when using mailtransport. > Suggest to change it to 5 min or more. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Mon Sep 10 04:40:11 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 55146 invoked from network); 10 Sep 2007 04:40:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Sep 2007 04:40:08 -0000 Received: (qmail 69200 invoked by uid 500); 10 Sep 2007 04:40:02 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 69135 invoked by uid 500); 10 Sep 2007 04:40:02 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 69124 invoked by uid 500); 10 Sep 2007 04:40:01 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 69121 invoked by uid 99); 10 Sep 2007 04:40:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2007 21:40:01 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 04:41:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1F3961A9832; Sun, 9 Sep 2007 21:39:44 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r574127 - in /webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2: storage/inmemory/ util/ Date: Mon, 10 Sep 2007 04:39:43 -0000 To: jasonweaver@example.org From: jasonweaver@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jasonweaver@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chamikara Date: Sun Sep 9 21:39:41 2007 New Revision: 574127 URL: http://svn.apache.org/viewvc?rev=574127&view=rev Log: Added a method to the InMemoryBeanMgr.java to check for Key conflicts. Other BeanManagers were modified use this when inserting entries to see whether the new entry have conflicts with the old once. Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryBeanMgr.java webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryInvokerBeanMgr.java webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMDBeanMgr.java webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemorySenderBeanMgr.java webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryBeanMgr.java URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryBeanMgr.java?rev=574127&r1=574126&r2=574127&view=diff ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryBeanMgr.java (original) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryBeanMgr.java Sun Sep 9 21:39:41 2007 @@ -146,5 +146,25 @@ return result; } - + + /** + * This try to find conflicting entries in the current table with the passed findBean list. + * Each find bean represents a key. + * + * @param findBeanList + * @throws SandeshaStorageException + */ + protected void checkKeys (List findBeanList) throws SandeshaStorageException { + + for (Iterator iter = findBeanList.iterator(); iter.hasNext();) { + RMBean rmBean = (RMBean) iter.next(); + + List conflicts = find(rmBean); + if (conflicts.size()>0) { + //we only report the first conflict here. + throw new SandeshaStorageException ("Key conflict occured with the bean " + conflicts.get(0)); + } + } + } + } Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryInvokerBeanMgr.java URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryInvokerBeanMgr.java?rev=574127&r1=574126&r2=574127&view=diff ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryInvokerBeanMgr.java (original) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryInvokerBeanMgr.java Sun Sep 9 21:39:41 2007 @@ -17,6 +17,7 @@ package org.apache.sandesha2.storage.inmemory; +import java.util.ArrayList; import java.util.List; import org.apache.axis2.context.AbstractContext; @@ -25,6 +26,7 @@ import org.apache.sandesha2.storage.SandeshaStorageException; import org.apache.sandesha2.storage.beanmanagers.InvokerBeanMgr; import org.apache.sandesha2.storage.beans.InvokerBean; +import org.apache.sandesha2.storage.beans.RMSBean; public class InMemoryInvokerBeanMgr extends InMemoryBeanMgr implements InvokerBeanMgr { @@ -33,6 +35,18 @@ } public boolean insert(InvokerBean bean) throws SandeshaStorageException { + + //checking weather there are any conflicting entries in the current table. + List findBeanList = new ArrayList (); + + InvokerBean findBean = new InvokerBean (); + if (bean.getMessageContextRefKey()!=null) { + findBean.setMessageContextRefKey (bean.getMessageContextRefKey()); + findBeanList.add(findBean); + } + + checkKeys (findBeanList); + boolean result = super.insert(bean.getMessageContextRefKey(), bean); mgr.getInMemoryTransaction().setReceivedMessages(true); return result; Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMDBeanMgr.java URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMDBeanMgr.java?rev=574127&r1=574126&r2=574127&view=diff ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMDBeanMgr.java (original) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMDBeanMgr.java Sun Sep 9 21:39:41 2007 @@ -17,6 +17,7 @@ package org.apache.sandesha2.storage.inmemory; +import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -26,6 +27,7 @@ import org.apache.sandesha2.storage.SandeshaStorageException; import org.apache.sandesha2.storage.beanmanagers.RMDBeanMgr; import org.apache.sandesha2.storage.beans.RMDBean; +import org.apache.sandesha2.storage.beans.RMSBean; public class InMemoryRMDBeanMgr extends InMemoryBeanMgr implements RMDBeanMgr { @@ -42,6 +44,19 @@ } public boolean insert(RMDBean bean) throws SandeshaStorageException { + + //checking weather there are any conflicting entries in the current table. + List findBeanList = new ArrayList (); + + RMDBean findBean = new RMDBean (); + + if (bean.getSequenceID()!=null) { + findBean.setSequenceID(bean.getSequenceID()); + findBeanList.add(findBean); + } + + checkKeys (findBeanList); + return super.insert(bean.getSequenceID(), bean); } Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java?rev=574127&r1=574126&r2=574127&view=diff ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java (original) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryRMSBeanMgr.java Sun Sep 9 21:39:41 2007 @@ -17,6 +17,8 @@ package org.apache.sandesha2.storage.inmemory; +import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import org.apache.axis2.context.AbstractContext; @@ -24,6 +26,8 @@ import org.apache.sandesha2.SandeshaException; import org.apache.sandesha2.storage.SandeshaStorageException; import org.apache.sandesha2.storage.beanmanagers.RMSBeanMgr; +import org.apache.sandesha2.storage.beans.RMBean; +import org.apache.sandesha2.storage.beans.RMDBean; import org.apache.sandesha2.storage.beans.RMSBean; public class InMemoryRMSBeanMgr extends InMemoryBeanMgr implements RMSBeanMgr { @@ -33,6 +37,24 @@ } public boolean insert(RMSBean bean) throws SandeshaStorageException { + + //checking weather there are any conflicting entries in the current table. + List findBeanList = new ArrayList (); + + RMSBean findBean = new RMSBean (); + if (bean.getSequenceID()!=null) { + findBean.setSequenceID(bean.getSequenceID()); + findBeanList.add(findBean); + } + + if (bean.getCreateSeqMsgID()!=null) { + findBean = new RMSBean (); + findBean.setCreateSeqMsgID(bean.getCreateSeqMsgID()); + findBeanList.add(findBean); + } + + checkKeys (findBeanList); + return super.insert(bean.getCreateSeqMsgID(), bean); } @@ -55,5 +77,5 @@ public RMSBean findUnique (RMSBean bean) throws SandeshaException { return (RMSBean) super.findUnique(bean); } - + } Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemorySenderBeanMgr.java URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemorySenderBeanMgr.java?rev=574127&r1=574126&r2=574127&view=diff ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemorySenderBeanMgr.java (original) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemorySenderBeanMgr.java Sun Sep 9 21:39:41 2007 @@ -17,6 +17,7 @@ package org.apache.sandesha2.storage.inmemory; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -29,6 +30,7 @@ import org.apache.sandesha2.i18n.SandeshaMessageKeys; import org.apache.sandesha2.storage.SandeshaStorageException; import org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr; +import org.apache.sandesha2.storage.beans.RMSBean; import org.apache.sandesha2.storage.beans.SenderBean; public class InMemorySenderBeanMgr extends InMemoryBeanMgr implements SenderBeanMgr { @@ -51,6 +53,18 @@ if (bean.getMessageID() == null) throw new SandeshaStorageException(SandeshaMessageHelper.getMessage( SandeshaMessageKeys.nullMsgId)); + + //checking weather there are any conflicting entries in the current table. + List findBeanList = new ArrayList (); + + SenderBean findBean = new SenderBean (); + if (bean.getMessageID()!=null) { + findBean.setMessageID (bean.getMessageID()); + findBeanList.add(findBean); + } + + checkKeys (findBeanList); + boolean result = super.insert(bean.getMessageID(), bean); mgr.getInMemoryTransaction().setSentMessages(true); return result; Modified: webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java?rev=574127&r1=574126&r2=574127&view=diff ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java (original) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/core/src/main/java/org/apache/sandesha2/util/SequenceManager.java Sun Sep 9 21:39:41 2007 @@ -279,6 +279,7 @@ public static boolean hasSequenceTimedOut(RMSBean rmsBean, String internalSequenceId, StorageManager storageManager) throws SandeshaException { + //FIXME - get this policy from the service level. SandeshaPolicyBean propertyBean = SandeshaUtil.getPropertyBean(storageManager.getContext().getAxisConfiguration()); --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Mon Sep 10 04:41:18 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 55592 invoked from network); 10 Sep 2007 04:41:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Sep 2007 04:41:17 -0000 Received: (qmail 69570 invoked by uid 500); 10 Sep 2007 04:41:10 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 69527 invoked by uid 500); 10 Sep 2007 04:41:10 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 69516 invoked by uid 500); 10 Sep 2007 04:41:10 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 69513 invoked by uid 99); 10 Sep 2007 04:41:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2007 21:41:10 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 04:42:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D6A2A1A9832; Sun, 9 Sep 2007 21:40:53 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r574128 - /webservices/sandesha/branches/sandesha2/java/1_3/modules/tests/src/test/java/org/apache/sandesha2/storage/KeyConflictTest.java Date: Mon, 10 Sep 2007 04:40:53 -0000 To: jasonweaver@example.org From: jasonweaver@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jasonweaver@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chamikara Date: Sun Sep 9 21:40:53 2007 New Revision: 574128 URL: http://svn.apache.org/viewvc?rev=574128&view=rev Log: A test for checking the keyConflict method I added previously. Added: webservices/sandesha/branches/sandesha2/java/1_3/modules/tests/src/test/java/org/apache/sandesha2/storage/KeyConflictTest.java Added: webservices/sandesha/branches/sandesha2/java/1_3/modules/tests/src/test/java/org/apache/sandesha2/storage/KeyConflictTest.java URL: http://svn.apache.org/viewvc/webservices/sandesha/branches/sandesha2/java/1_3/modules/tests/src/test/java/org/apache/sandesha2/storage/KeyConflictTest.java?rev=574128&view=auto ============================================================================== --- webservices/sandesha/branches/sandesha2/java/1_3/modules/tests/src/test/java/org/apache/sandesha2/storage/KeyConflictTest.java (added) +++ webservices/sandesha/branches/sandesha2/java/1_3/modules/tests/src/test/java/org/apache/sandesha2/storage/KeyConflictTest.java Sun Sep 9 21:40:53 2007 @@ -0,0 +1,89 @@ +package org.apache.sandesha2.storage; + +import org.apache.axis2.AxisFault; +import org.apache.axis2.context.ConfigurationContext; +import org.apache.axis2.description.Parameter; +import org.apache.axis2.engine.AxisConfiguration; +import org.apache.sandesha2.Sandesha2Constants; +import org.apache.sandesha2.SandeshaException; +import org.apache.sandesha2.SandeshaTestCase; +import org.apache.sandesha2.policy.SandeshaPolicyBean; +import org.apache.sandesha2.storage.beanmanagers.RMSBeanMgr; +import org.apache.sandesha2.storage.beans.RMSBean; +import org.apache.sandesha2.storage.inmemory.InMemoryStorageManager; +import org.apache.sandesha2.util.SandeshaUtil; + +/* + * Copyright 2007 The Apache Software Foundation. + * Copyright 2007 International Business Machines Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//This tests weather sandesha2 correctly checks Key Conflicts (i.e. when inserting) in it's storage managers. +public class KeyConflictTest extends SandeshaTestCase { + + public KeyConflictTest(String name) { + super(name); + } + + public void testKeyConflicts () throws AxisFault { + + try { + AxisConfiguration axisConfiguration = new AxisConfiguration (); + ConfigurationContext configurationContext = new ConfigurationContext (axisConfiguration); + + //setting a dummy property been to stop Sandesha2 from throwing exceptions. + SandeshaPolicyBean policyBean = new SandeshaPolicyBean (); + axisConfiguration.addParameter(new Parameter (Sandesha2Constants.SANDESHA_PROPERTY_BEAN,policyBean)); + + InMemoryStorageManager storageManager = new InMemoryStorageManager (configurationContext); + + Transaction transaction = storageManager.getTransaction(); + + RMSBeanMgr rmsBeanMgr = storageManager.getRMSBeanMgr(); + + RMSBean rmsBean = new RMSBean (); + RMSBean duplicateRMSBean = new RMSBean (); + + rmsBean.setCreateSeqMsgID(SandeshaUtil.getUUID()); + duplicateRMSBean.setCreateSeqMsgID(SandeshaUtil.getUUID()); + + String sequenceId = SandeshaUtil.getUUID(); + + //we duplicate this sequenceID in both RMSBeans. + rmsBean.setSequenceID(sequenceId); + duplicateRMSBean.setSequenceID(sequenceId); + + rmsBeanMgr.insert(rmsBean); + + boolean exceptionThrown = false; + try { + rmsBeanMgr.insert(duplicateRMSBean); + } catch (SandeshaStorageException e) { + exceptionThrown = true; + } + + transaction.commit(); + + assertTrue(exceptionThrown); + } catch (SandeshaStorageException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SandeshaException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + +} --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Mon Sep 10 04:44:54 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 56803 invoked from network); 10 Sep 2007 04:44:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Sep 2007 04:44:51 -0000 Received: (qmail 71735 invoked by uid 500); 10 Sep 2007 04:44:44 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 71666 invoked by uid 500); 10 Sep 2007 04:44:44 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 71655 invoked by uid 99); 10 Sep 2007 04:44:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2007 21:44:44 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 04:44:49 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id B3AA171420B for <jasonweaver@example.org>; Sun, 9 Sep 2007 21:44:29 -0700 (PDT) Message-ID: <12251260.1189399469724.JavaMail.jira@brutus> Date: Sun, 9 Sep 2007 21:44:29 -0700 (PDT) From: "Chamikara Jayalath (JIRA)" <jasonweaver@example.org> To: jasonweaver@example.org Subject: [jira] Updated: (SANDESHA2-118) Two RMSBeans can have same 'Internal Sequence Id' In-Reply-To: <28620535.1187962411718.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SANDESHA2-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chamikara Jayalath updated SANDESHA2-118: ----------------------------------------- Priority: Major (was: Blocker) I've fixed the 1.3 issue with my last commit. Added a function to check for key conflicts when inserting entries. Reducing the priority of this Issue since rest it's a 1.2 issue and since we are now more concerned about the 1.3 release. > Two RMSBeans can have same 'Internal Sequence Id' > ------------------------------------------------- > > Key: SANDESHA2-118 > URL: https://issues.apache.org/jira/browse/SANDESHA2-118 > Project: Sandesha2 > Issue Type: Bug > Affects Versions: 1.2 > Environment: Axis2/Sandesha2 1_2 + 1_3 - server side - with sync RM... > Reporter: Hans G Knudsen > Attachments: storage_manager_constraing.txt > > > I have a logging where 2 rmsbeans are found to be equal in InMemoryBeanMgr.findUnique - on server side > The logging shows that > Internal Seq Id : Sandesha2InternalSequence:urn:uuid:16F6AC7844CFEFE6C61187856973547 > are equal for both beans... > I will try to find out if this is still the case for the 1_3 branch.... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: jasonweaver@example.org For additional commands, e-mail: jasonweaver@example.org From sandeshajasonweaver@example.org Tue Sep 11 06:56:23 2007 Return-Path: <sandeshajasonweaver@example.org> Delivered-To: jasonweaver@example.org Received: (qmail 47930 invoked from network); 11 Sep 2007 06:56:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 11 Sep 2007 06:56:21 -0000 Received: (qmail 66480 invoked by uid 500); 11 Sep 2007 06:56:15 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 66429 invoked by uid 500); 11 Sep 2007 06:56:14 -0000 Mailing-List: contact jasonweaver@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:jasonweaver@example.org> List-Unsubscribe: <mailto:jasonweaver@example.org> List-Post: <mailto:jasonweaver@example.org> List-Id: <sandesha-dev.ws.apache.org> Delivered-To: mailing list jasonweaver@example.org Received: (qmail 66418 invoked by uid 500); 11 Sep 2007 06:56:14 -0000 Delivered-To: jasonweaver@example.org Received: (qmail 66415 invoked by uid 99); 11 Sep 2007 06:56:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 23:56:14 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2007 06:56:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 64C181A9838; Mon, 10 Sep 2007 23:55:59 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r574490 - in /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2: handlers/ msgprocessors/ polling/ storage/ storage/inmemory/ util/ workers/ Date: Tue, 11 Sep 2007 06:55:52 -0000 To: jasonweaver@example.org From: jasonweaver@example.org X-Mailer: svnmailer-1.0.8 Message-Id: <jasonweaver@example.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mckierna Date: Mon Sep 10 23:55:50 2007 New Revision: 574490 URL: http://svn.apache.org/viewvc?rev=574490&view=rev Log: performance improvements Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaOutHandler.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MsgProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/StorageManager.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/TerminateManager.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/WSRMMessageSender.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/Invoker.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/InvokerWorker.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SandeshaThread.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/Sender.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/SenderWorker.java webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/workers/WorkerLock.java Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaOutHandler.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaOutHandler.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaOutHandler.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/handlers/SandeshaOutHandler.java Mon Sep 10 23:55:50 2007 @@ -84,10 +84,11 @@ return returnValue ; } } - + + StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context, context.getAxisConfiguration()); //this will change the execution chain of this message to work correctly in retransmissions. //For e.g. Phases like security will be removed to be called in each retransmission. - SandeshaUtil.modifyExecutionChainForStoring(msgCtx); + SandeshaUtil.modifyExecutionChainForStoring(msgCtx, storageManager); String DONE = (String) msgCtx.getProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE); if (null != DONE && "true".equals(DONE)) { @@ -97,7 +98,6 @@ } msgCtx.setProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE, "true"); - StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(context, context.getAxisConfiguration()); Transaction transaction = null; @@ -126,7 +126,7 @@ } if (msgProcessor != null){ - if(msgProcessor.processOutMessage(rmMsgCtx)){ + if(msgProcessor.processOutMessage(rmMsgCtx, transaction)){ //the msg was paused returnValue = InvocationResponse.SUSPEND; } Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AckRequestedProcessor.java Mon Sep 10 23:55:50 2007 @@ -266,7 +266,7 @@ msgContext.setProperty(Sandesha2Constants.QUALIFIED_FOR_SENDING, Sandesha2Constants.VALUE_FALSE); // passing the message through sandesha2sender - SandeshaUtil.executeAndStore(ackRMMsgCtx, key); + SandeshaUtil.executeAndStore(ackRMMsgCtx, key, storageManager); // inserting the new Ack. senderBeanMgr.insert(ackBean); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/AcknowledgementProcessor.java Mon Sep 10 23:55:50 2007 @@ -116,6 +116,12 @@ String outSequenceId = sequenceAck.getIdentifier().getIdentifier(); RMSBean rmsBean = SandeshaUtil.getRMSBeanFromSequenceId(storageManager, outSequenceId); + if(rmsBean==null){ + if (log.isDebugEnabled()) + log.debug("Exit: AcknowledgementProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processAckHeader, Sequence bean not found"); + return; + } + if (outSequenceId == null || "".equals(outSequenceId)) { String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.outSeqIDIsNull); log.debug(message); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java Mon Sep 10 23:55:50 2007 @@ -51,6 +51,9 @@ import org.apache.sandesha2.util.SOAPAbstractFactory; import org.apache.sandesha2.util.SandeshaUtil; import org.apache.sandesha2.util.SequenceManager; +import org.apache.sandesha2.workers.SandeshaThread; +import org.apache.sandesha2.workers.SenderWorker; +import org.apache.sandesha2.workers.WorkerLock; import org.apache.sandesha2.wsrm.CreateSequence; import org.apache.sandesha2.wsrm.SequenceOffer; @@ -82,7 +85,7 @@ return false; } - public boolean processOutMessage(RMMsgContext rmMsgCtx) throws AxisFault { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction tran) throws AxisFault { if (log.isDebugEnabled()) log.debug("Enter: ApplicationMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage"); @@ -252,7 +255,7 @@ // server and the client sides. if (rmsBean == null) { rmsBean = SequenceManager.setupNewClientSequence(msgContext, internalSequenceId, storageManager); - rmsBean = addCreateSequenceMessage(rmMsgCtx, rmsBean, storageManager); + rmsBean = addCreateSequenceMessage(rmMsgCtx, rmsBean, storageManager, tran); } } @@ -405,7 +408,7 @@ // processing the response if not an dummy. if (!dummyMessage) - processResponseMessage(rmMsgCtx, rmsBean, internalSequenceId, outSequenceID, messageNumber, storageKey, storageManager); + processResponseMessage(rmMsgCtx, rmsBean, internalSequenceId, outSequenceID, messageNumber, storageKey, storageManager, tran); //Users wont be able to get reliable response msgs in the back channel in the back channel of a //reliable message. If he doesn't have a endpoint he should use polling mechanisms. @@ -417,7 +420,7 @@ } private RMSBean addCreateSequenceMessage(RMMsgContext applicationRMMsg, RMSBean rmsBean, - StorageManager storageManager) throws AxisFault { + StorageManager storageManager, Transaction tran) throws AxisFault { if (log.isDebugEnabled()) log.debug("Enter: ApplicationMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4reateSequenceMessage, " + rmsBean); @@ -484,7 +487,7 @@ createSeqMsg.setProperty(Sandesha2Constants.QUALIFIED_FOR_SENDING, Sandesha2Constants.VALUE_FALSE); - SandeshaUtil.executeAndStore(createSeqRMMessage, createSequenceMessageStoreKey); + SandeshaUtil.executeAndStore(createSeqRMMessage, createSequenceMessageStoreKey, storageManager); retransmitterMgr.insert(createSeqEntry); @@ -497,7 +500,7 @@ } private void processResponseMessage(RMMsgContext rmMsg, RMSBean rmsBean, String internalSequenceId, String outSequenceID, long messageNumber, - String storageKey, StorageManager storageManager) throws AxisFault { + String storageKey, StorageManager storageManager, Transaction tran) throws AxisFault { if (log.isDebugEnabled()) log.debug("Enter: ApplicationMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processResponseMessage, " + internalSequenceId + ", " + outSequenceID); @@ -521,6 +524,11 @@ } } + boolean sendingNow = false; + if(outSequenceID != null && !storageManager.hasUserTransaction(msg)) { + sendingNow = true; + } + // Now that we have decided which sequence to use for the message, make sure that we secure // it with the correct token. RMMsgCreator.secureOutboundMessage(rmsBean, msg); @@ -563,11 +571,35 @@ // increasing the current handler index, so that the message will not be // going throught the SandeshaOutHandler again. msg.setCurrentHandlerIndex(msg.getCurrentHandlerIndex() + 1); - - SandeshaUtil.executeAndStore(rmMsg, storageKey); + SandeshaUtil.executeAndStore(rmMsg, storageKey, storageManager); + + // Lock the sender bean before we insert it, if we are planning to send it ourselves + SenderWorker worker = null; + if(sendingNow) { + String workId = appMsgEntry.getMessageID() + appMsgEntry.getTimeToSend(); + SandeshaThread sender = storageManager.getSender(); + ConfigurationContext context = msg.getConfigurationContext(); + WorkerLock lock = sender.getWorkerLock(); + + worker = new SenderWorker(context, appMsgEntry, rmsBean.getRMVersion()); + worker.setLock(lock); + worker.setWorkId(workId); + // Actually take the lock + lock.addWork(workId, worker); + } retransmitterMgr.insert(appMsgEntry); + // Commit the transaction, so that the sender worker starts with a clean slate. + if(tran != null && tran.isActive()) tran.commit(); + + if(worker != null) { + try { + worker.run(); + } catch(Exception e) { + log.error("Caught exception running SandeshaWorker", e); + } + } if (log.isDebugEnabled()) log.debug("Exit: ApplicationMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processResponseMessage"); } Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CloseSequenceProcessor.java Mon Sep 10 23:55:50 2007 @@ -141,7 +141,7 @@ return false; } - public boolean processOutMessage(RMMsgContext rmMsgCtx) throws AxisFault { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction) throws AxisFault { if (log.isDebugEnabled()) log.debug("Enter: CloseSequenceProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage"); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java Mon Sep 10 23:55:50 2007 @@ -343,7 +343,7 @@ return true; } - public boolean processOutMessage(RMMsgContext rmMsgCtx) { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction) { if (log.isDebugEnabled()) log.debug("Enter: CreateSeqMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage"); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqResponseMsgProcessor.java Mon Sep 10 23:55:50 2007 @@ -262,7 +262,7 @@ return true; } - public boolean processOutMessage(RMMsgContext rmMsgCtx) { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction) { if (log.isDebugEnabled()) { log.debug("Enter: CreateSeqResponseMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage"); log.debug("Exit: CreateSeqResponseMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage " + Boolean.FALSE); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/LastMessageProcessor.java Mon Sep 10 23:55:50 2007 @@ -51,7 +51,7 @@ return true; } - public boolean processOutMessage(RMMsgContext rmMsgCtx) { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction) { return false; } Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MakeConnectionProcessor.java Mon Sep 10 23:55:50 2007 @@ -211,7 +211,7 @@ messagePending.toSOAPEnvelope(returnMessage.getEnvelope()); } - public boolean processOutMessage(RMMsgContext rmMsgCtx) { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction) { return false; } Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MsgProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MsgProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MsgProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/MsgProcessor.java Mon Sep 10 23:55:50 2007 @@ -40,5 +40,5 @@ * @return true if the msg context has been paused * @throws AxisFault */ - public boolean processOutMessage(RMMsgContext rmMsgCtx) throws AxisFault; -} \ No newline at end of file + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction)throws AxisFault; +} Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java Mon Sep 10 23:55:50 2007 @@ -28,6 +28,7 @@ import org.apache.axis2.context.MessageContext; import org.apache.axis2.context.OperationContext; import org.apache.axis2.engine.Handler.InvocationResponse; +import org.apache.axis2.transport.RequestResponseTransport; import org.apache.axis2.transport.TransportUtils; import org.apache.axis2.wsdl.WSDLConstants; import org.apache.commons.logging.Log; @@ -345,6 +346,18 @@ RMMsgContext ackRMMsgContext = AcknowledgementManager.generateAckMessage(rmMsgCtx, bean, sequenceId, storageManager,true); AcknowledgementManager.addAckBeanEntry(ackRMMsgContext, sequenceId, timeToSend, storageManager); + + // If the MEP doesn't need the backchannel, and nor do we, we should signal it so that it + // can close off as soon as possible. + result = InvocationResponse.ABORT; + RequestResponseTransport t = null; + t = (RequestResponseTransport) rmMsgCtx.getProperty(RequestResponseTransport.TRANSPORT_CONTROL); + + // Tell the transport that there will be no response message + if(t != null) { + TransportUtils.setResponseWritten(msgCtx, false); + t.acknowledgeMessage(msgCtx); + } } // If this message matches the WSRM 1.0 pattern for an empty last message (e.g. Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqMsgProcessor.java Mon Sep 10 23:55:50 2007 @@ -349,7 +349,7 @@ return terminateSeqResponseRMMsg; } - public boolean processOutMessage(RMMsgContext rmMsgCtx) throws AxisFault { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction) throws AxisFault { if (log.isDebugEnabled()) log.debug("Enter: TerminateSeqMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage"); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/TerminateSeqResponseMsgProcessor.java Mon Sep 10 23:55:50 2007 @@ -89,7 +89,7 @@ return true; } - public boolean processOutMessage(RMMsgContext rmMsgCtx) { + public boolean processOutMessage(RMMsgContext rmMsgCtx, Transaction transaction) { if(log.isDebugEnabled()) log.debug("Enter: TerminateSeqResponseMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage"); if(log.isDebugEnabled()) log.debug("Exit: TerminateSeqResponseMsgProcessor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4processOutMessage " + Boolean.FALSE); return false; Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/polling/PollingManager.java Mon Sep 10 23:55:50 2007 @@ -149,17 +149,18 @@ // This sequence must have been terminated, or deleted stopThreadForSequence(entry.getSequenceId(), true); } else { - if (log.isDebugEnabled()) - log.debug("Polling rms " + beanToPoll); + if (log.isDebugEnabled()) + log.debug("Polling rms " + beanToPoll); // The sequence is there, but we still only poll if we are expecting reply messages, // or if we don't have clean ack state. - boolean cleanAcks = false; - if (beanToPoll.getNextMessageNumber() > -1) - cleanAcks = AcknowledgementManager.verifySequenceCompletion(beanToPoll.getClientCompletedMessages(), beanToPoll.getNextMessageNumber()); + boolean cleanAcks = false; + if (beanToPoll.getNextMessageNumber() > -1) + cleanAcks = AcknowledgementManager.verifySequenceCompletion(beanToPoll.getClientCompletedMessages(), beanToPoll.getNextMessageNumber()); long repliesExpected = beanToPoll.getExpectedReplies(); - if((force || !cleanAcks || repliesExpected > 0) && beanToPoll.getReferenceMessageStoreKey() != null) - pollForSequence(beanToPoll.getAnonymousUUID(), beanToPoll.getInternalSequenceID(), beanToPoll.getReferenceMessageStoreKey(), beanToPoll, entry); + if(beanToPoll.getSequenceID() != null && (force || !cleanAcks || repliesExpected > 0) && beanToPoll.getReferenceMessageStoreKey() != null) + pollForSequence(beanToPoll.getAnonymousUUID(), beanToPoll.getInternalSequenceID(), beanToPoll.getReferenceMessageStoreKey(), beanToPoll, entry); } + if(log.isDebugEnabled()) log.debug("Exit: PollingManager888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4pollRMSSide"); } @@ -262,7 +263,7 @@ //this message should not be sent until it is qualified. I.e. till it is sent through the Sandesha2TransportSender. makeConnectionRMMessage.setProperty(Sandesha2Constants.QUALIFIED_FOR_SENDING, Sandesha2Constants.VALUE_FALSE); - SandeshaUtil.executeAndStore(makeConnectionRMMessage, makeConnectionMsgStoreKey); + SandeshaUtil.executeAndStore(makeConnectionRMMessage, makeConnectionMsgStoreKey, storageManager); senderBeanMgr.insert(makeConnectionSenderBean); } Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/StorageManager.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/StorageManager.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/StorageManager.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/StorageManager.java Mon Sep 10 23:55:50 2007 @@ -100,5 +100,16 @@ public abstract MessageContext retrieveMessageContext (String storageKey, ConfigurationContext configContext) throws SandeshaStorageException; public abstract void removeMessageContext (String storageKey) throws SandeshaStorageException; - + + + /** + * If there is no user transaction in scope then we can optimize the sending / invoking of a + * message. This method allows the StorageManager to tell the core Sandesha code if there + * is a transaction in scope. + * @return true, if there is a user transaction in scope. + */ + public abstract boolean hasUserTransaction(MessageContext message) throws SandeshaStorageException; + + public abstract boolean requiresMessageSerialization(); + } Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/inmemory/InMemoryStorageManager.java Mon Sep 10 23:55:50 2007 @@ -338,6 +338,15 @@ public void initStorage (AxisModule moduleDesc) { } + + //We do not support user transactions in-memory + public boolean hasUserTransaction(MessageContext msg) { + return false; + } + + public boolean requiresMessageSerialization() { + return useSerialization; + } private class SerializedStorageEntry { MessageContext message; @@ -355,6 +364,7 @@ SOAPEnvelope envelope; } } + Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/AcknowledgementManager.java Mon Sep 10 23:55:50 2007 @@ -18,9 +18,7 @@ package org.apache.sandesha2.util; import java.util.Collection; -import java.util.HashSet; import java.util.Iterator; -import java.util.Set; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axiom.soap.SOAPFactory; @@ -106,63 +104,48 @@ if(log.isDebugEnabled()) log.debug("Exit: AcknowledgementManager888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4piggybackAcksIfPresent, anon"); return transaction; } - - // From here on, we must be dealing with a real address. Piggyback all sequences that have an - // acksTo that matches the To address, and that have an ackMessage queued up for sending. - Set acked = new HashSet(); - SenderBean findBean = new SenderBean(); - findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK); - findBean.setSend(true); - findBean.setToAddress(target.getAddress()); - - Collection collection = retransmitterBeanMgr.find(findBean); - - if (transaction != null && transaction.isActive()) - transaction.commit(); - - transaction = storageManager.getTransaction(); - - Iterator it = collection.iterator(); - while (it.hasNext()) { - SenderBean ackBean = (SenderBean) it.next(); - + // From here on, we must be dealing with a real address. Piggyback all sequences that have an + // acksTo that matches the To address, and that have an ackMessage queued up for sending. We + // search for RMDBeans first, to avoid a deadlock. + // + // As a special case, if this is a terminate sequence message then add in ack messages for + // any sequences that have an acksTo that matches the target address. This helps to ensure + // that request-response sequence pairs end cleanly. + RMDBean findRMDBean = new RMDBean(); + findRMDBean.setAcksToEPR(target.getAddress()); + findRMDBean.setTerminated(false); + Collection rmdBeans = storageManager.getRMDBeanMgr().find(findRMDBean); + Iterator sequences = rmdBeans.iterator(); + while(sequences.hasNext()) { + RMDBean sequence = (RMDBean) sequences.next(); + String sequenceId = sequence.getSequenceID(); + + // Look for the SenderBean that carries the ack, there should be at most one + SenderBean findBean = new SenderBean(); + findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK); + findBean.setSend(true); + findBean.setSequenceID(sequenceId); + findBean.setToAddress(target.getAddress()); + + SenderBean ackBean = retransmitterBeanMgr.findUnique(findBean); + // Piggybacking will happen only if the end of ack interval (timeToSend) is not reached. long timeNow = System.currentTimeMillis(); - if (ackBean.getTimeToSend() > timeNow) { + if (ackBean != null && ackBean.getTimeToSend() > timeNow) { // Delete the beans that would have sent the ack retransmitterBeanMgr.delete(ackBean.getMessageID()); storageManager.removeMessageContext(ackBean.getMessageContextRefKey()); - String sequenceId = ackBean.getSequenceID(); if (log.isDebugEnabled()) log.debug("Piggybacking ack for sequence: " + sequenceId); + RMMsgCreator.addAckMessage(rmMessageContext, sequenceId, sequence); + + } else if(rmMessageContext.getMessageType() == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) { + if(log.isDebugEnabled()) log.debug("Adding extra acks, as this is a terminate"); + + if(sequence.getHighestInMessageNumber() > 0) { + if(log.isDebugEnabled()) log.debug("Piggybacking ack for sequence: " + sequenceId); - RMDBean rmdBean = SandeshaUtil.getRMDBeanFromSequenceId(storageManager, sequenceId); - if(rmdBean != null && !rmdBean.isTerminated()) { - RMMsgCreator.addAckMessage(rmMessageContext, sequenceId, rmdBean); - } - acked.add(sequenceId); - } - } - - // As a special case, if this is a terminate sequence message then add in ack messages for - // any sequences that have an acksTo that matches the target address. This helps to ensure - // that request-response sequence pairs end cleanly. - if(rmMessageContext.getMessageType() == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) { - if(log.isDebugEnabled()) log.debug("Adding extra acks, as this is a terminate"); - - RMDBean findRMDBean = new RMDBean(); - findRMDBean.setAcksToEPR(target.getAddress()); - findRMDBean.setTerminated(false); - Collection rmdBeans = storageManager.getRMDBeanMgr().find(findRMDBean); - Iterator sequences = rmdBeans.iterator(); - while(sequences.hasNext()) { - RMDBean sequence = (RMDBean) sequences.next(); - String sequenceId = sequence.getSequenceID(); - - if(!acked.contains(sequenceId) && sequence.getHighestInMessageNumber() > 0) { - if(log.isDebugEnabled()) log.debug("Piggybacking ack for sequence: " + sequenceId); RMMsgCreator.addAckMessage(rmMessageContext, sequenceId, sequence); - acked.add(sequenceId); } } } @@ -313,7 +296,7 @@ // passing the message through sandesha2sender ackMsgContext.setProperty(Sandesha2Constants.SET_SEND_TO_TRUE, Sandesha2Constants.VALUE_TRUE); - SandeshaUtil.executeAndStore(ackRMMsgContext, key); + SandeshaUtil.executeAndStore(ackRMMsgContext, key, storageManager); // inserting the new ack. retransmitterBeanMgr.insert(ackBean); Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java?rev=574490&r1=574489&r2=574490&view=diff ============================================================================== --- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java (original) +++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/SandeshaUtil.java Mon Sep 10 23:55:50 2007 @@ -25,6 +25,7 @@ import java.util.Map; import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.apache.axiom.om.OMElement; @@ -883,7 +884,7 @@ else return false; } - public static void executeAndStore (RMMsgContext rmMsgContext, String storageKey) throws AxisFault { + public static void executeAndStore (RMMsgContext rmMsgContext, String storageKey, StorageManager manager) throws AxisFault { if (log.isDebugEnabled()) log.debug("Enter: SandeshaUtil888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4xecuteAndStore, " + storageKey); @@ -891,7 +892,7 @@ ConfigurationContext configurationContext = msgContext.getConfigurationContext(); SandeshaPolicyBean policy = getPropertyBean(msgContext.getAxisOperation()); - if(policy.isUseMessageSerialization()) { + if(manager.requiresMessageSerialization()) { msgContext.setProperty(Sandesha2Constants.QUALIFIED_FOR_SENDING, Sandesha2Constants.VALUE_TRUE); StorageManager store = getSandeshaStorageManager(configurationContext, configurationContext.getAxisConfiguration()); @@ -908,27 +909,26 @@ Sandesha2TransportOutDesc sandesha2TransportOutDesc = new Sandesha2TransportOutDesc(); msgContext.setTransportOut(sandesha2TransportOutDesc); + + //this invocation has to be a blocking one. + Boolean isTransportNonBlocking = (Boolean) msgContext.getProperty(MessageContext.TRANSPORT_NON_BLOCKING); + if (isTransportNonBlocking!=null && isTransportNonBlocking.booleanValue()) + msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.FALSE); // sending the message once through Sandesha2TransportSender. if (msgContext.isPaused()) AxisEngine.resumeSend(msgContext); else { - //this invocation has to be a blocking one. - - Boolean isTransportNonBlocking = (Boolean) msgContext.getProperty(MessageContext.TRANSPORT_NON_BLOCKING); - if (isTransportNonBlocking!=null && isTransportNonBlocking.booleanValue()) - msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.FALSE); - - AxisEngine.send(msgContext); - - msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, isTransportNonBlocking); + AxisEngine.send(msgContext); } + //put the original value of isTransportNonBlocking back on + msgContext.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, isTransportNonBlocking); } if (log.isDebugEnabled()) log.debug("Exit: SandeshaUtil888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4xecuteAndStore"); } - public static void modifyExecutionChainForStoring (MessageContext message) + public static void modifyExecutionChainForStoring (MessageContext message, StorageManager manager) throws SandeshaException { @@ -936,8 +936,7 @@ if (property!=null) return; //Phases are already set. Dont hv to redo. - SandeshaPolicyBean policy = getPropertyBean(message.getAxisOperation()); - if(policy.isUseMessageSerialization()) + if(manager.requiresMessageSerialization()) return; // No need to mess with the transport when we use message serialization TransportOutDescription transportOutDescription = message.getTransportOut(); @@ -1120,40 +1119,53 @@ } - public static SOAPEnvelope cloneEnvelope(SOAPEnvelope envelope) throws SandeshaException { - - // Now clone the env and set it in the message context - XMLStreamReader streamReader = envelope.cloneOMElement().getXMLStreamReader(); - SOAPEnvelope clonedEnvelope = new StAXSOAPModelBuilder(streamReader, null).getSOAPEnvelope(); - - // you have to explicitely set the 'processed' attribute for header - // blocks, since it get lost in the above read from the stream. - - SOAPHeader header = envelope.getHeader(); - if (header != null) { - Iterator childrenOfOldEnv = header.getChildElements(); - Iterator childrenOfNewEnv = clonedEnvelope.getHeader().getChildElements(); - while (childrenOfOldEnv.hasNext()) { - - SOAPHeaderBlock oldEnvHeaderBlock = (SOAPHeaderBlock) childrenOfOldEnv.next(); -
{'source': 'Apache Software Foundation Public Mail Archives'}