You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Rashmi Hunt (JIRA)" <de...@tuscany.apache.org> on 2009/02/11 18:42:59 UTC

[jira] Created: (TUSCANY-2839) Remove the need to have a ConnectionFactory in case of oneway invocation path on the service side

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
            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.


[jira] Commented: (TUSCANY-2839) Remove the need to have a ConnectionFactory in case of oneway invocation path on the service side

Posted by "ant elder (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672965#action_12672965 ] 

ant elder commented on TUSCANY-2839:
------------------------------------

A fix for this was added in r743710. That change updates the JMSBindingContext to also hold a jmsResponseSession as well as the jmsSession, removes the setJmssession method, and change the getJmsSession/getResponseJmsSession methods to lazily create the session.


> 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
>            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.


[jira] Issue Comment Edited: (TUSCANY-2839) Remove the need to have a ConnectionFactory in case of oneway invocation path on the service side

Posted by "Rashmi Hunt (JIRA)" <de...@tuscany.apache.org>.
    [ 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.


[jira] Updated: (TUSCANY-2839) Remove the need to have a ConnectionFactory in case of oneway invocation path on the service side

Posted by "ant elder (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder updated TUSCANY-2839:
-------------------------------

    Component/s: Java SCA JMS Binding Extension

> 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.


[jira] Resolved: (TUSCANY-2839) Remove the need to have a ConnectionFactory in case of oneway invocation path on the service side

Posted by "ant elder (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder resolved TUSCANY-2839.
--------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-Next

Fixes for those two points committed in r744971

> 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
>             Fix For: Java-SCA-Next
>
>
> 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.


[jira] Commented: (TUSCANY-2839) Remove the need to have a ConnectionFactory in case of oneway invocation path on the service side

Posted by "Rashmi Hunt (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674078#action_12674078 ] 

Rashmi Hunt commented on TUSCANY-2839:
--------------------------------------

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.