[
https://issues.apache.org/jira/browse/ODE-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748352#action_12748352
]
Harald Lernbeiss commented on ODE-579:
--------------------------------------
I tried the beta version with your patch, but it did not work. Here are my
findings from debugging into ODE:
First problem:
--------------
The exchange DAO is neither updated nor saved to the data base in (or after)
the call to UnreliablePartnerRoleMessageExchangeImpl.replyAsync(jbiMexId),
which is called from OdeConsumer.invokePartner(odeMex). So the ODE mex is not
found when the reply from the external web service arrives. Another thought on
this: Even if it was saved to the data base, what if the response from the web
service arrives prior to the DAO being updated in the data base? I successfully
tried a little workaround that attaches the ODE mex ID to the JBI mex as a
property in order to have it available when the response arrives (see the
comments tagged 'JR 2009-08-27' below). It is in the class OdeConsumer and
looks like that:
class OdeConsumer extends ServiceBridge implements JbiMessageExchangeProcessor {
// ...
public void invokePartner(final PartnerRoleMessageExchange odeMex) throws
ContextException {
// ...
try {
if (!isTwoWay) {
// ...
} else {
final InOut inout = (InOut) jbiMex;
NormalizedMessage nmsg = inout.createMessage();
mapper.toNMS(nmsg, odeMex.getRequest(),
odeMex.getOperation().getInput().getMessage(), null);
inout.setInMessage(nmsg);
// JR 2009-08-27: Remember the ODE mex ID as a property
attached to the JBI mex
inout.setProperty("org.apache.ode.odeMexId",
odeMex.getMessageExchangeId());
doSendJBI(odeMex, inout);
odeMex.replyAsync(inout.getExchangeId());
}
} catch (MessagingException me) {
// ...
}
}
// ...
private void outResponse(final InOut jbiMex) {
PartnerRoleMessageExchange pmex = null;
// JR 2009-08-27: Try to get the ODE mex ID as a property attached to
the JBI mex
Object odeMexIdObj = jbiMex.getProperty("org.apache.ode.odeMexId");
if (odeMexIdObj != null && odeMexIdObj instanceof String) {
String odeMexId = (String) odeMexIdObj;
pmex = (PartnerRoleMessageExchange)
_ode._server.getMessageExchange(odeMexId);
}
if (pmex == null) {
// JR 2009-08-27: No ODE mex yet, so try to find it via the JBI mex
ID; will not find the mex as long
// as the DAO is not updated and saved
pmex = (PartnerRoleMessageExchange)
_ode._server.getMessageExchangeByForeignKey(jbiMex.getExchangeId());
}
if (pmex == null) {
// JR 2009-08-27: Still no ODE mex, give up
__log.warn("Received a response for unknown partner role message
exchange " + jbiMex.getExchangeId());
return;
}
String mapperName = pmex.getProperty(Mapper.class.getName());
// ...
}
// ...
}
A solution to the problem should care of saving the mex updated with the JBI
mex ID (the foreign key).
Second problem:
---------------
After the response from the external service has arrived, the ODE mex is
reconstructed from the information in the DAO (data base). The information from
the field PartnerRoleMessageExchangeImpl._state is not stored in the data base,
so the field value of the reconstructed ODE mex will always have the initial
value INVOKE_XXX, even if it was set to ASYNC (for the original mex object) in
the call to UnreliablePartnerRoleMessageExchangeImpl.replyAsync(jbiMexId) when
sending the outgoing message. The consequence is that in the method
PartnerRoleMessageExchangeImpl.reply(response), which is called from
OdeConsumer.outResponse(jbiMex), the code will not call
PartnerRoleMessageExchangeImpl.asyncACK() and the mex updated with the response
will not be saved and processed, so ODE runs into a timeout. For my experiments
I just commented out the 'if' above the call to asyncACK(), but the problem
should definitely be fixed by correctly restoring the state of the mex from the
data base.
> Ode 2.0 beta problem while using pathner service - corresponding method not
> implemented
> ---------------------------------------------------------------------------------------
>
> Key: ODE-579
> URL: https://issues.apache.org/jira/browse/ODE-579
> Project: ODE
> Issue Type: Bug
> Components: BPEL Runtime
> Affects Versions: 2.0
> Environment: all
> Reporter: Andrey Kopachevsky
> Assignee: Matthieu Riou
> Attachments: mex-by-fk-patch.txt
>
>
> We (Eclipse Swordfish project team) are using ODE with apache ServiceMix 4.
> Our test example consists of
> simple bpel process that invoke jax-ws web service during execution and
> return result.
> Ode 1.2 works fine with that. But ODE 2.0 beta not returns any response to
> caller. And I see following warning in logs:
> *WARNING: Received a response for unknown partner role message exchange
> 11ee7ee0-28f9-4250-9c6c-e9becf573f7f*
> After research source codes we find following code snippet inside
> org.apache.ode.jbi.OdeConsumer:
> private void outResponse(final InOut jbiMex) {
> PartnerRoleMessageExchange pmex = (PartnerRoleMessageExchange)
>
> _ode._server.getMessageExchangeByForeignKey(jbiMex.getExchangeId());
> if (pmex == null) {
> __log.warn("Received a response for unknown partner
> role message exchange " + jbiMex.getExchangeId());
> return;
> }
> ...........
> so _ode._server.getMessageExchangeByForeignKey(jbiMex.getExchangeId() retutns
> NULL;
> I've check _ode._server implementation class with is BpelServerImpl and find
> out that getMessageExchangeByForeignKey method not implemented:
> public MessageExchange getMessageExchangeByForeignKey(String foreignKey)
> throws BpelEngineException {
> // TODO Auto-generated method stub
> return null;
> }
> It is very big issue for us,
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.