[
https://issues.apache.org/jira/browse/TUSCANY-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674078#action_12674078
]
rashmihunt edited comment on TUSCANY-2839 at 2/16/09 3:50 PM:
---------------------------------------------------------------
1) All 4 wireformatserviceInterceptor classes invoke() method, needs to check
if the operation is oneway and if yes, not to call invokeResponse() in that
class.
//if operation is oneway, return back.
Operation operation = msg.getOperation();
if (operation != null && operation.isNonBlocking()) {
jmsResourceFactory.closeConnection();
return msg;
}
2) Also TransportServiceInterceptor.invokeResponse() function should check for
oneway operation as a first step..otherwise context.getJmsResponseSession()
fail since there is
no connectionfactory because of no response for oneway calls.
Operation operation = msg.getOperation();
if (operation != null && operation.isNonBlocking()) {
return msg;
}
was (Author: rashmihunt):
The fix
> Remove the need to have a ConnectionFactory in case of oneway invocation path
> on the service side
> -------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-2839
> URL: https://issues.apache.org/jira/browse/TUSCANY-2839
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA JMS Binding Extension
> Reporter: Rashmi Hunt
>
> This is an issue in the case of oneway where Tuscany code path needs
> Connection Factory where it's not necessary to have one as there is no
> response in case of oneway.
> When a oneway message is received at the service,
> TransportServiceInterceptor.invoke() method calls invokeRequest() before
> calling invokeResponse().
> TransportServiceInterceptor.invokeRequest() is trying to create JMS
> connection/session by calling
> context.setJmsSession(context.getJmsResourceFactory().createSession()),
> The session created here later gets used in various
> xxxMessageProcessor.createJMSMessage() to create a JMS message. The issue
> here is JmsResourceFactory().createSession(),
> tries to create a connection and there is no Connection Factory defined in
> SCDL for the service and there is no need to have default connectionFactory,
> 'ConnectionFactory'
> either. This call ends up in connectionfactory not found exception since the
> jndi lookup fails.
> In oneway case, why there is a need to call
> 'context.setJmsSession(context.getJmsResourceFactory().createSession())' in
> TransportServiceInterceptor.invokeRequest() method? since there is no need
> to
> create a message using this jms session as there is no response. Trying to
> comment this call causes issues in downstream classes like
> xxxMessageProcessor classes. This entire invocation path should
> understand oneway pattern and right now there isn't way to clearly seperate.
> Sample SCDL for reference and service for this issue
> <reference name="component_2">
>
> <interface.java
> interface="test.sca.binding.sca.oneway.Component_2"/>
> <binding.jms>
> <destination name="jms/oneway"/>
> <connectionFactory name="jms/oneway_cf"/>
> </binding.jms>
> </reference>
> <component name="Component_2">
> <implementation.java
> class="test.sca.binding.sca.oneway.Component_2Impl"/>
>
> <service name="Component_2">
> <binding.jms>
> <destination name="jms/oneway"/>
> <activationSpec name="jms/SCA_JMS_AS"/>
> </binding.jms>
> </service>
> <reference name="component_3" target="Component_3"/>
> </component>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.