How to use ServiceInvoker?
haradays Jul 7, 2011 11:01 PMhi
In my project,
a service is called by using ServiceInvoker.
When a service is called from ServiceInvoker, the service runs second times.
The first calling returns a normal value to the HTTP client.
And ServiceInvoker puts log in between the first calling and second calling.
I want to call service only once.
Any suggestions would be greatly appreciated.
thanks.
<<infomation>>
JBossESB Version :jbossesb-server-4.9
Action class source |
---|
public class MyJMSListenerAction extends AbstractActionLifecycle
protected ConfigTree _config; public Message serviceAuth(Message message) throws Exception{ |
jbos-esb.xml |
---|
<?xml version="1.0"?> <jbossesb parameterReloadSecs="5" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.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.0.1.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"> <providers> <jbr-provider name="refProvider" protocol="http"> <jbr-bus busid="choiceProxyChannel" port="8021"/> </jbr-provider> </providers> <services> <service category="MyCategory" description="MyDescription" invmScope="GLOBAL" name="choiceProxy"> <listeners> <jbr-listener busidref="choiceProxyChannel" is-gateway="true" name="choiceListener"/> </listeners> <actions mep="RequestResponse"> <action name="action" class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction" process="serviceAuth" /> </actions> </service> <service category="MyCategory" description="refDescription" invmScope="GLOBAL" name="authOK"> <actions mep="RequestResponse"> <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln"> <property name="message" value="one time"/> </action> </actions> </service> </services> </jbossesb> |
HTTP client source |
---|
<html> <form method="post" action="http://localhost:8021/test/Hello" --> <input type="text" name="number"><br> <input type="submit" value="submit"> </body> |
HttpServlet source |
---|
public void doPost(HttpServletRequest req, HttpServletResponse res) res.setContentType("text/html; charset=EUC-JP"); PrintWriter out = res.getWriter(); out.println("i'm called "); } |
log |
---|
11:48:27,801 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 11:48:32,879 INFO [STDOUT] one time: |