[Design of JBoss ESB] - How to deliver a synchronous message when integrating jbpm
by ztk5912
I write a simple application,but I meet a problem.Here is the description of my application.
In the esb I defined three services.Firt service is to start a jbpm process defined in the project using bpmprocessor.Second service is to check password,and it is to be called by the process using EsbActionHandler.Then the last service is to receive the final result return from the process and show the result.The following is part of my jboss-esb.xml.
<services>
| <service category="Starter" name="StartProcess"
| description="to start a process instance">
| <listeners>
| <jms-listener name="JMS-Gateway"
| busidref="quickstartGwChannel" maxThreads="1" is-gateway="true" />
| <jms-listener name="EsbListener"
| busidref="quickstartEsbChannel" maxThreads="1" />
| </listeners>
| <actions mep="OneWay">
| <action name="testStore"
| class="org.jboss.soa.esb.actions.TestMessageStore" />
|
| <action name="display"
| class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction"
| process="displayMessage" />
| <action name="start_process"
| class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
| <property name="command"
| value="StartProcessInstanceCommand" />
| <property name="process-definition-name"
| value="LoopCheckPassword" />
| <property name="esbToBpmVars">
| <mapping esb="BODY_CONTENT" bpm="theBody" />
| </property>
| </action>
| </actions>
| </service>
|
|
| <service category="SingleAction" name="CheckPassword"
| description="to check password using soapclient to communicate with web service">
| <listeners>
| <jms-listener name="EsbListener1" busidref="useless1"
| maxThreads="1" />
| </listeners>
| <actions>
| <action name="request-mapper"
| class="org.jboss.soa.esb.samples.quickstart.helloworld.CheckPassword.EsbAction.InputAdapter">
| </action>
| <action name="soapui-client-action"
| class="org.jboss.soa.esb.actions.soap.SOAPClient">
| <property name="wsdl"
| value="http://211.87.226.149/axis2/services/Hrser?wsdl" />
| <property name="responseAsOgnlMap" value="true" />
| <property name="SOAPAction" value="doCheckPassword" />
| </action>
| </actions>
| </service>
|
|
| <service category="ResultService" name="returnResult"
| description="to deal with the return message from the process">
| <listeners>
| <jms-listener name="EsbListener2" busidref="useless2"
| maxThreads="1" />
| </listeners>
| <actions>
| <action name="resultExtraction"
| class="org.jboss.soa.esb.samples.quickstart.helloworld.CheckPassword.EsbAction.ShowAndReturnMessage">
| </action>
| </actions>
| </service>
|
| </services>
Then in the client class,I use ServiceInvoker to deliver a synchronous messge.The code is:
ServiceInvoker deliveryAdapter = new ServiceInvoker("Starter", "StartProcess");
| response=deliveryAdapter.deliverSync(message, 10000L);
Now the problem is,the result return to the third service which is form the process cannot be passed to the client. The purpose of my application is to check multi-group username and password one time with the help of jbpm while the second service just can do a single check. So I want to return the final result to the client.But in my application the client is to call the first service and receive the message processed by the actions in the first service.I cannot receive the final result because the action of calling process(using BpmProcessor) in the first service is asynchronous. How can I manage it?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169489#4169489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169489
17 years, 8 months
[Design of JBoss Remoting, Unified Invokers] - Re: Remoting and remote classloading
by scott.stark@jboss.org
"ron.sigal(a)jboss.com" wrote :
| I was thinking more in terms of declarative injection by way of *-beans.xml files. I'm not sure I see how an application level bean would get access to Remoting ... . Actually, that raises a question I've been meaning to figure out: What is the microcontainter/POJO analog to grabbing an MBeanServer and accessing an MBean by way of its object name?
|
There is a KernelRegistryPlugin that allows for accessing info about a bean, but typically this is done by injection using the name.
"ron.sigal(a)jboss.com" wrote :
| I'm missing something. If "application framework code" means the Application Server, then these statements sound contradictory ... . Also, is there a way for a Connector method to check that it's being called by JBoss code?
|
Yes, application framework code here are the server containers and application metadata. An application wanting remote class loading would include a -jboss-beans.xml that wires the deployment class loader to the remoting connector. There is also a jboss-classload*.xml that could be used to define the class loader bean name so its known. Maybe there is a pattern such that its not necessary to use jboss-classload*.xml for this.
The Connector would simply have a permission check. The permission would be mapped to jboss code by the permission CodeSource. Whoever sets up the security policy effectively defines jboss/server code from application code based on the permission urls.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169446#4169446
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169446
17 years, 8 months