Bug 780525 (SOA-2959) - EPRHelper modifies EPRs when serialising to XML
Summary: EPRHelper modifies EPRs when serialising to XML
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2959
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB
Version: 5.1.0 GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0.ER4
Assignee: tcunning
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-03 20:01 UTC by Rick Wagner
Modified: 2011-11-15 09:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
All SOA-P
Last Closed: 2011-11-15 09:24:58 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 780526 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker JBESB-3574 0 Major Closed EPRHelper modifies EPRs when serialising to XML 2013-07-30 10:29:47 UTC
Red Hat Issue Tracker SOA-2959 0 Major Closed EPRHelper modifies EPRs when serialising to XML 2013-07-30 10:29:47 UTC

Internal Links: 780526

Description Rick Wagner 2011-03-03 20:01:53 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000006JsVo&sfdc.override=1
project_key: SOA

The setSpecificEPR initialises a type extension if one is not already present, but this cannot be done safely.

Any modifications to an EPR should only be done at the construction point, as it is the creator who is responsible for doing this.

JBESB-3574 contains a diff which configures the type on construction, but we should also consider updating the EPR classes to throw exceptions if modifications are made after the creator has finished with their construction.

Comment 1 Rick Wagner 2011-03-03 20:02:57 UTC
This is the SOA 5.1 ticket for JBESB-3574.

Comment 2 Rick Wagner 2011-03-03 20:02:57 UTC
Link: Added: This issue is related to JBESB-3574


Comment 3 Rick Wagner 2011-03-03 20:04:44 UTC
Link: Added: This issue Cloned to SOA-2960


Comment 4 Rick Wagner 2011-03-07 16:57:43 UTC
Link: Removed: This issue Cloned to SOA-2960 


Comment 5 Rick Wagner 2011-03-07 16:58:42 UTC
Originally cloned from SOA-2960, which was for 5.0.2.  

Since there will be no 5.0.3 (or upstream work on 5.0.2) I deleted that one.

Rick

Comment 7 Anne-Louise Tangring 2011-04-08 20:06:09 UTC
Please link with soa-2961, which is the One Off for this.

Comment 8 Rick Wagner 2011-04-08 20:13:09 UTC
Link: Added: This issue is related to SOA-2961


Comment 9 Rick Wagner 2011-04-08 20:13:12 UTC
soa-2961 is the one-off support patch for this issue

Comment 10 tcunning 2011-08-10 03:37:48 UTC
Checked in one off fixes to CP branch.


tcunning@localhost:JBESB_4_10_CP]$ svn commit
Sending        product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/EPR.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/EmailEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/FTPEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/FTPSEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/FileEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/HTTPEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/InVMEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JDBCEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/JMSEpr.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/LogicalEPR.java
Sending        product/rosetta/src/org/jboss/soa/esb/addressing/eprs/SFTPEpr.java
Sending        product/rosetta/tests/src/org/jboss/soa/esb/addressing/tests/EPRUnitTest.java
Sending        product/rosetta/tests/src/org/jboss/soa/esb/addressing/util/tests/EPRHelperUnitTest.java
Transmitting file data .s............
Committed revision 37374.


Comment 11 David Le Sage 2011-09-01 05:36:05 UTC
Release Notes Docs Status: Added: Documented as Resolved Issue
Writer: Added: dlesage
Release Notes Text: Added: https://issues.jboss.org/browse/SOA-2959

The setSpecificEPR initialised a type extension if none were already present, but this could not be done safely. Any modifications to an EPR should only have been done at the construction point. The code has been changed so this is now the case.


Comment 12 David Le Sage 2011-09-01 05:36:53 UTC
Release Notes Text: Removed: https://issues.jboss.org/browse/SOA-2959

The setSpecificEPR initialised a type extension if none were already present, but this could not be done safely. Any modifications to an EPR should only have been done at the construction point. The code has been changed so this is now the case. Added: https://issues.jboss.org/browse/SOA-2959

The setSpecificEPR initialised a type extension if none were already present, but this could not be done safely as it lead to concurrent failures. Any modifications to an EPR should only have been done at the construction point. The code has been changed so this is now the case.


Comment 13 Rick Wagner 2011-11-07 19:03:33 UTC
Text description of customer's use case.  (Thread heavily when running against this-- the customer had about 30 client threads.)

"Our ESB process is pretty simple as the following,  if you create the sample process, you may be see the same issue at a heavy concurrency run.
ESB Web Service endpoint -->JMSRouter [async call to a JMS service to archive request XML]--> JAXB custom action {transfer XML to JAVA Bean] --->EJBProcessor [call a EJB session bean to perform Claim process] --> JAXB custom action[Transfer Response JAVA Bean to XML] --> Custom Exception handle action --> JMSRouter [async call to a JMS service to archive response XML] -->return to web service call."

Comment 14 Rick Wagner 2011-11-07 19:04:26 UTC
Customer's jboss-esb.xml:

<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
 xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.2.0.xsd">
 <providers>
  <!-- 
  <jbr-provider host="127.0.0.1" name="Realtime-JBR-Http" protocol="http">
   <jbr-bus busid="Realtime-JBR-Http" port="6001"/>
  </jbr-provider>
  -->
  <jms-provider connection-factory="ConnectionFactory" name="RealTimeArchiveQueque">
   <jms-bus busid="RealtimeArchiveChannel">
    <jms-message-filter dest-name="queue/Realtime_Archive_Queue" dest-type="QUEUE"/>
   </jms-bus>
  </jms-provider>
  <http-provider name="http">
   <http-bus busid="http-channel"/>
  </http-provider>
 </providers>
 <services>
  <service category="ICMS" description="ICMS Http Web Service"
   invmScope="GLOBAL" name="ICMS-Http-WS">
   <property name="maxThreads" value="100"/>
   <property name="inVMPassByValue" value="false"/>
   <listeners>
    <http-gateway busidref="http-channel" name="Http-Gateway" urlPattern="claim/*">
     <property name="allowedPorts" value="8081"/>
    </http-gateway>
   </listeners>
   <actions inXsd="/xsd/IcmsAPI_Request.xsd" mep="RequestResponse"
    outXsd="/xsd/IcmsAPI_Response.xsd" validate="false" webservice="true">
    <!--  Request Archive -->
    <action class="com.ihealth.icm.esb.action.JMSArchiveRouter"
     name="RequestArchiveRouter" process="process">
     <property name="jndiName" value="queue/Realtime_Archive_Queue"/>
     <property name="connection-factory" value="ConnectionFactory"/>
     <property name="unwrap" value="false"/>
     <property name="persistent" value="false"/>
     <property name="security-principal" value="guest"/>
     <property name="security-credential" value="guest"/>
     <property name="process.event" value="RequestArchive"/>
     <property name="process.source" value="TMHP-INTERACTIVE"/>
    </action>
    <!-- XML to Java POJO JAXB -->
    <action
     class="com.ihealth.icm.esb.action.JaxbXMLToRequestPojoAction" name="ClaimXMLToJavaBOTransform">
     <property name="process.logevent" value="true"/>
    </action>
    <!-- invoke Core ICM EJB service -->
    <action class="com.ihealth.icm.esb.action.EJBClaimProcessor" name="EJBRealtimeClaimProcess">
     <property name="ejb3" value="true"/>
     <property name="jndi-name" value="icmService/ClaimSessionBean/local"/>
     <property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory"/>
     <property name="method" value="processClaim"/>
     <property name="esb-out-var" value="org.jboss.soa.esb.message.defaultEntry"/>
     <property name="process.transactiontype" value="T"/>
     <property name="process.SLA" value="1.0"/>
     <property name="ejb-params">
      <arg0 type="java.lang.String">process.message.id</arg0>
      <arg1 type="com.ihealth.icm.model.Request">org.jboss.soa.esb.message.defaultEntry</arg1>
      <arg2 type="java.lang.Long">process.request.in.time</arg2>
      <arg3 type="com.ihealth.icm.model.ProcessConfig">process.config</arg3>
     </property>
     <property name="process.logevent" value="true"/>
    </action>
    <!-- transform back to response XML JAXB -->
    <action
     class="com.ihealth.icm.esb.action.JaxbResponsePojoToXMLAction" name="ClaimJavaBOToXmlTransform">
     <property name="process.logevent" value="true"/>
    </action>
    <!--  Handler Exception -->
    <action class="com.ihealth.icm.esb.action.ExceptionProcessor" name="ExceptionHandler">
     <property name="targetServiceName" value="ICMS-Realtime-ArchiveListner"/>
     <property name="targetServiceCategory" value="ICMS"/>
     <property name="allowRetry" value="false"/>
    </action>
    <!--  Response Archive   -->
    <action class="com.ihealth.icm.esb.action.JMSArchiveRouter"
     name="ResponseArchiveRouter" process="process">
     <property name="jndiName" value="queue/Realtime_Archive_Queue"/>
     <property name="connection-factory" value="ConnectionFactory"/>
     <property name="unwrap" value="false"/>
     <property name="persistent" value="false"/>
     <property name="security-principal" value="guest"/>
     <property name="security-credential" value="guest"/>
     <property name="process.event" value="ResponseArchive"/>
    </action>
   </actions>
  </service>
  <service category="ICMS" description="ICMS Realtime Archive Listner" name="ICMS-Realtime-ArchiveListner">
   <property name="maxThreads" value="100"/>
   <listeners>
    <jms-listener busidref="RealtimeArchiveChannel" is-gateway="false"
     maxThreads="100" name="RealtimeRequestArchiveQListner"/>
   </listeners>
   <actions mep="OneWay">
    <action class="com.ihealth.icm.esb.action.EJBArchiveProcessor" name="EJBRealtimeRequestArchive">
     <property name="ejb3" value="true"/>
     <property name="ejb-name" value="RealtimeArchiveSessionBean"/>
     <property name="jndi-name" value="icmService/RealtimeArchiveSessionBean/local"/>
     <property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory"/>
     <property name="method" value="archiveMessage"/>
     <property name="ejb-params">
      <arg0 type="com.ihealth.icm.model.ArchiveDataBean">org.jboss.soa.esb.message.defaultEntry</arg0>
     </property>
    </action>
   </actions>
  </service>
  <service category="ICMS"
   description="ICMS Http Web Service For Batch Process"
   invmScope="GLOBAL" name="ICMS-Http-Batch-WS">
   <property name="maxThreads" value="100"/>
   <property name="inVMPassByValue" value="false"/>
   <listeners>
    <http-gateway busidref="http-channel" name="Http-Gateway" urlPattern="claim/*">
     <property name="allowedPorts" value="8081"/>
    </http-gateway>
   </listeners>
   <actions inXsd="/xsd/IcmsAPI_Request.xsd" mep="RequestResponse"
    outXsd="/xsd/IcmsAPI_Response.xsd" validate="false" webservice="true">
    <!--  Request Archive -->
    <action class="com.ihealth.icm.esb.action.JMSArchiveRouter"
     name="RequestArchiveRouter" process="process">
     <property name="jndiName" value="queue/Realtime_Archive_Queue"/>
     <property name="connection-factory" value="ConnectionFactory"/>
     <property name="unwrap" value="false"/>
     <property name="persistent" value="false"/>
     <property name="security-principal" value="guest"/>
     <property name="security-credential" value="guest"/>
     <property name="process.event" value="RequestArchive"/>
		 <property name="process.source" value="TMHP-BATCH"/>
    </action>
    <!-- XML to Java POJO JAXB -->
    <action
     class="com.ihealth.icm.esb.action.JaxbXMLToRequestPojoAction" name="ClaimXMLToJavaBOTransform">
     <property name="process.logevent" value="true"/>
    </action>
    <!-- invoke Core ICM EJB service -->
    <action class="com.ihealth.icm.esb.action.EJBClaimProcessor" name="EJBRealtimeClaimProcess">
     <property name="ejb3" value="true"/>
     <property name="jndi-name" value="icmService/ClaimSessionBean/local"/>
     <property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory"/>
     <property name="method" value="processClaim"/>
     <property name="esb-out-var" value="org.jboss.soa.esb.message.defaultEntry"/>
     <property name="process.transactiontype" value="T"/>
     <property name="process.SLA" value="1.0"/>
     <property name="ejb-params">
      <arg0 type="java.lang.String">process.message.id</arg0>
      <arg1 type="com.ihealth.icm.model.Request">org.jboss.soa.esb.message.defaultEntry</arg1>
      <arg2 type="java.lang.Long">process.request.in.time</arg2>
      <arg3 type="com.ihealth.icm.model.ProcessConfig">process.config</arg3>
     </property>
     <property name="process.logevent" value="true"/>
    </action>
    <!-- transform back to response XML JAXB -->
    <action
     class="com.ihealth.icm.esb.action.JaxbResponsePojoToXMLAction" name="ClaimJavaBOToXmlTransform">
     <property name="process.logevent" value="true"/>
    </action>
    <!--  Handler Exception -->
    <action class="com.ihealth.icm.esb.action.ExceptionProcessor" name="ExceptionHandler">
     <property name="targetServiceName" value="ICMS-Realtime-ArchiveListner"/>
     <property name="targetServiceCategory" value="ICMS"/>
     <property name="allowRetry" value="false"/>
    </action>
    <!--  Response Archive   -->
    <action class="com.ihealth.icm.esb.action.JMSArchiveRouter"
     name="ResponseArchiveRouter" process="process">
     <property name="jndiName" value="queue/Realtime_Archive_Queue"/>
     <property name="connection-factory" value="ConnectionFactory"/>
     <property name="unwrap" value="false"/>
     <property name="persistent" value="false"/>
     <property name="security-principal" value="guest"/>
     <property name="security-credential" value="guest"/>
     <property name="process.event" value="ResponseArchive"/>
    </action>
   </actions>
  </service>
 </services>
</jbossesb>

Comment 15 Martin Vecera 2011-11-15 09:24:58 UTC
Verified with CR1.


Note You need to log in before you can comment on or make changes to this bug.