-
1. Re: Sending messages in Request/Response mode
kconner Apr 21, 2008 7:38 AM (in response to mkol)We would really need some more information about your application before we could identify any issues. The Unresponsive EPR is normally caused by a service timing out on a synchronous invocation and there may be a number of causes.
One of the things I would like to point out is that we have rewritten the jBPM/ESB integration and this has now made its way back into trunk (it was previously available in our CP branch). This integration is much cleaner (and simpler) than the original and uses asynchronous messaging under the covers. This has many advantages over the original, for example better performance, no blocking of threads, the ability to use transactions, message redelivery etc.
We will be releasing the next version of the project within the next few weeks (see the development forum for the dates).
Kev -
2. Re: Sending messages in Request/Response mode
mkol Apr 21, 2008 8:05 AM (in response to mkol)Thank you for your answer. So about more details :
We developped our own EsbRequestResponse client to send message to the ESB. This client is used in a jbpm handler to send the message initialized in others steps.
This is the code line added in the jbpm handler (So waiting for a response) :// Send the message
Message response = esbClient.send(request);
esbClient is an EsbRequestResponseClient (Created by us). Here is the code of the method send used in the handlerServiceInvoker invoker;
try {
invoker = getInvoker(message);
} catch (MessageDeliverException e) {
throw new StandardRuntimeException(CodeTypeEvenement.COMMUN_ESB_TRANSFERT, "message=" + message, e);
}
URI messageId = message.getHeader().getCall().getMessageID();
if (messageId == null) {
try {
messageId = new URI(UUID.randomUUID().toString());
LOG.debug(" Warning, the message.header.call.messageId was NULL, random generated value added " + messageId);
message.getHeader().getCall().setMessageID(messageId);
} catch (URISyntaxException e) {
throw new StandardRuntimeException(CodeTypeEvenement.COMMON_ESB_MISSING_MESSAGE_ID, " Automatic MessageId generator failed messageId=" + messageId, e);
}
}
URI uri = message.getHeader().getCall().getAction();
if (uri == null) {
LOG.debug("Warning, Action Missing");
String uriString = "urn:" + destination.getCategory()+ ":" + destination.getName();
try {
uri = new URI(uriString);
} catch (URISyntaxException e) {
throw new StandardRuntimeException(CodeTypeEvenement.COMMON_ESB_MISSING_OR_BAD_URI, "Error while parsing " + uriString, e);
}
message.getHeader().getCall().setAction(uri);
}
Message messageResponse = null;
if (LOG.isDebugEnabled()) LOG.debug("Send Message" + message);
try {
messageResponse = invoker.deliverSync(message, responseTimeoutInMillis);
} catch (MessageDeliverException e) {
throw new StandardRuntimeException(CodeTypeEvenement.COMMUN_ESB_TRANSFERT, "invoker=" + invoker + ",message=" + message, e);
} catch (FaultMessageException e) {
throw new StandardRuntimeException(CodeTypeEvenement.COMMUN_ESB_TRANSFERT, "invoker=" + invoker + ",message=" + message, e);
} catch (RegistryException e) {
throw new StandardRuntimeException(CodeTypeEvenement.COMMUN_ESB_TRANSFERT, "invoker=" + invoker + ",message=" + message, e);
}
//}
if (LOG.isDebugEnabled()) LOG.debug("Request/Response:" + messageResponse);
return messageResponse;
}
So we are in the case of the caught of the exception MessageDeliveryException.
We are using the ServiceInvoker to create an invoker where it is set the destination. In the method getInvoker, we are setting correctly the message header :
Here is the getInvoker code :LOG.debug("Make Invoker");
ServiceInvoker invoker = new ServiceInvoker(destination);
Call call = messageToSend.getHeader().getCall();
EPR replyToEpr = getServiceEPR(replyTo);
EPR sourceEpr = getServiceEPR(source);
EPR errorToEpr = getServiceEPR(errorTo);
EPR to = getServiceEPR(destination);
call.setTo(to);
call.setFrom(sourceEpr);
call.setReplyTo(replyToEpr);
call.setFaultTo(errorToEpr);
return invoker;
I hope that I gave you enough details. Otherwise, tell me the sort of needed information to help you to understand my problem
Thanks you
henry -
3. Re: Sending messages in Request/Response mode
kconner Apr 21, 2008 9:43 AM (in response to mkol)The best way would be for you to send the server.log file so that I can see what is happening in your deployment. Would this be possible? Could you email it to me?
Thanks,
Kev -
4. Re: Sending messages in Request/Response mode
mkol Apr 21, 2008 10:42 AM (in response to mkol)I have just sent the log by email. You must received it, sent by henri.gueye@capgemini.com or hgueye@capgemini.fr.
Thanks, -
5. Re: Sending messages in Request/Response mode
kconner Apr 21, 2008 10:51 AM (in response to mkol)Thanks, it has just arrived. I will get back to you as soon as I can.
Kev