Date of First Response: 2010-01-03 21:40:15 project_key: SOA With this change: adding this member variable: private Transformer transformer = null; Commenting out/removing this line: // final Transformer transformer = xslTemplate.newTransformer(); and moving it to the initialize method as: //Line for point of reference in the method. xslTemplate = createTemplate(transformerConfig.getTemplateFile(), factory); //New line added in transformer = xslTemplate.newTransformer();
Entire source file if you wish to compare it.
Attachment: Added: TestXsltAction.java
Hi Jim, It was intentional to not have the creation of the transformer in the initialize method and instead have it in the process methods because, as far as I am aware, a Transformer instance is not thread safe and depending on the setting of maxThreads setting this could lead to problems. Regards, /Daniel
Daniel is spot on, Transformer is not thread safe.
Okay I stand corrected, but can this be written to create a "transformer" pool so that each thread running can get their own instance. This would be a big improvement "approximately 20%" or so in my testing performance? I assume in a http_gateway multiple threads are running, is that true, how can that be confirmed? In my testing I saw no errors, so at least with my configuration is it possible this is only single threaded?
Comment in either xslttransformation as needed
Attachment: Added: jboss-esb.xml
Transform XSLT file
Attachment: Added: MyTransform.xslt
Attachment: Added: PerformanceTesting-soapui-project.xml
The SOAP UI attached project can drive thoughput, I usually run the 10k test called 10k Average Load and I have to set the end point with the 10k Throughput Request both under the 10k Average Payload Size
Link: Added: This issue depends JBESB-3098
The fix won't work in some cases. JBR gateway is an example, since the configuration parameter has a different name: <jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true"> <property name="jbr-maxThreads" value="4" /> </jbr-listener>
Sorry, what does the gateway have to do with this?
I found out that this is a different attribute. Thanks to Kevin. Verified in ER7.