0 Replies Latest reply on Apr 7, 2008 9:56 AM by yogesharora

    HTTP Endpoint Issues

    yogesharora

      Hello Everyone,

      We are evaluating JBossESB for our application which is going to be developed for flexibility to integrate different technologies and applications.

      Here is our simplest scenario where we use ESB:
      Browser ----> HTTP ---> JBoss ESB ----> HTTP ---> Servlet (JBoss AS) ---> Session Bean (JBoss AS)

      We read the documentation available on JBossESB sites and implemented a POC for evaluation. Following is the snippets of the configuration file (jboss-esb.xml).

      JMS provider for ESB aware messages (non-gateway listner):
      ----------------------------------------------------------------------------------------

      <jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-context-factory="org.jnp.interfaces.NamingContextFactory" jndi-URL="localhost">
       <jms-bus busid="perfEsbChannel">
       <jms-message-filter dest-type="QUEUE" dest-name="queue/perftest_esb" />
       </jms-bus>
      </jbr-provider>


      JBR provider for HTTP requests:
      ----------------------------------------------
      <jbr-provider name="JBR-Http" protocol="http" host="localhost">
       <jbr-bus busid="Http-1" port="8765" />
      </jbr-provider>


      Service Listener declarations:
      -----------------------------------
      <listeners>
       <jms-listener name="JMS-ESBListener" busidref="perfEsbChannel" maxThreads="1" />
       <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" maxThreads="1"/>
      </listeners>


      Service Action declarations (inbuilt HttpRouter):
      -------------------------------------------------------
      <action name="httprouter" class="org.jboss.soa.esb.actions.routing.HttpRouter">
       <property name="routeUrl" value="http://localhost:8080/perf/perftester" />
      </action>


      Service Action declarations (custom router):
      ---------------------------------------------------
      <action name="httprouter" class="com.oki.us.jbossesb.perf.test.PerfTestRouter">
       <property name="routeUrl" value="http://localhost:8080/perf/perftester" />
      </action>


      Here are some questions/clarifications:
      1. We are implementing simple HTTP request forward from http endpoint to external http request (servlet/session bean). We want to know if we really need to use JMS Queue (perfEsbChannel and queue/perftest_esb) for simple http endpoint to external http? From the documentation we understand JMS queue provides reliability, load balancing, failover, etc but we want to know if it (JMS queue) is mandatory and we can improve the performance by removing JMS.
      2. We have tried removing the jms-listner for perfEsbChannel and we get build error: 19:12:31,980 ERROR [ESBAwareGenerator] JbossRemoting listener only supported in Gateway mode.
      3. For forwarding the request to external http (serverlet/session bean) we have used inbuilt HttpRouter and facing problems (exception "Unresponsive EPR: JMSEpr" is thrown) upon returning from HttpRouter::process() method. We looked at the HttpRouter implementation and we find that post request is being sent and second it is not handling response properly (returning null for the message which every action should). Please find the detailed exception at the end of the post.
      4. To resolve calling servlet issue we have implemented custom http router where we are creating HttpClient and calling executeMethod with the url. We are able to call servlet so want to know if this is the right apporach for calling external http (servlet).

      Apologize for the big post. Any replies would be greatly appreciated.

      Here are detailed exception for point 3:
      [ServiceInvoker] Unresponsive EPR: JMSEpr [ PortReference < <wsa:Address jms://localhost/queue/perftest_http_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : Co
      nnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : 1/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ].......


      Thanks in advance.