Announcement Announcement Module
No announcement yet.
ws:inbound-gateway performance issues Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ws:inbound-gateway performance issues


    I have some questions regarding performance for the ws:inbound-gateway. I have a very simple service: WS->JMS (Text message)

    <bean id="jmsQueue" class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName" value="${queue}" />
    		<property name="jndiTemplate" ref="jndiTemplate" />
    <si:channel id="jmsChannel" />
    <si:channel id="requestChannel" />
    <si:channel id="errorChannel" />
    <bean id="txManager"
    		class="org.springframework.transaction.jta.WebLogicJtaTransactionManager" />
    <si-jms:outbound-channel-adapter id="jmsWriter"
    		destination="jmsQueue" channel="jmsChannel" />
    <bean id="sourceToStringTransformer"
    		  class="xzy.transformer.DOMSourceToStringTransformer" />
    <si:transformer id="messageTransformer" ref="sourceToStringTransformer"
    		input-channel="requestChannel" method="transformDOMSourceToString"
    		output-channel="jmsChannel" />
    <si-ws:inbound-gateway id="WebServiceGateway" request-channel="requestChannel" />
    <si:outbound-channel-adapter channel="errorChannel" ref="errorHandler" method="handleError"/>
    I'm using Weblogic 11g as application server. I'm using SoapUI to send a valid XML (~12KB) to the service. In average, it takes around 1s for it to finish, which is very slow on a server without any load. I use nmon to measure the load and memory, and it is very low (idling).

    The DOMSourceToStringTransformer is a very simple (and should be quick) transformer:
    public class DOMSourceToStringTransformer
      public String transformDOMSourceToString(DOMSource domSource)
          StringWriter writer = new StringWriter();
          StreamResult result = new StreamResult(writer);
          TransformerFactory tf = TransformerFactory.newInstance();
          Transformer transformer = tf.newTransformer();
          transformer.transform(domSource, result);
          return writer.toString();
    I will look into the JVM so see which class/method is actually taking up all the time. But just wanted to ask in the mean time, is there something I've overlooked?

    Best Regards,
    Mathias Wiberg