Announcement Announcement Module
Collapse
No announcement yet.
Spring JMS Remoting Limitation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JMS Remoting Limitation

    All,

    We have an external facing web site that needs to invoke back end services via JMS. The proposed solution is to use Spring remoting via JMS. However, the online document says

    The JMS remoting support in the Spring Framework is pretty basic - it sends and receives on the same thread and in the same non-transactional Session, and as such throughput will be very implementation dependent.

    can some one please explain what does it mean exactly and can we use JMS rempoting in my scenario?

    thanks all!

  • #2
    What do you mean by

    Originally posted by andrewinblue
    that needs to invoke back end services via JMS.
    What is invoke in this case?!

    The JMS Remoting support (basicly all remoting support) is RPC over a transport (in this case JMS). So it is not about sending messages yourself.

    Comment


    • #3
      Thanks for the reply. The back end service is just Java Beans, it is pretty much the same as the example provided in document.

      I need to understand what's the limitation is before we decide to use this approach. As mentioned earlier, this is an external facing, potentially high throughput website.

      for example:
      Code:
      public class SimpleCheckingAccountService implements CheckingAccountService {
      
         public void cancelAccount(Long accountId) {
            System.out.println("Cancelling account [" + accountId + "]");
         }
      }

      then client side spring wire:

      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
      
         <bean id="checkingAccountService"
              class="org.springframework.jms.remoting.JmsInvokerProxyFactoryBean">
            <property name="serviceInterface" value="com.foo.CheckingAccountService"/>
            <property name="connectionFactory" ref="connectionFactory"/>
            <property name="queue" ref="queue"/>
         </bean>
      
      </beans>
      my front end code simply call the method use JMS
      \
      Code:
      public class Client {
      
         public static void main(String[] args) throws Exception {
            //----
            service.cancelAccount(new Long(10));
         }
      }

      Comment


      • #4
        Strange no one knows this?

        Comment


        • #5
          Was there a question in the previous post? I only see the code you use the expose and call the service... No question is apparent...

          The only way to know is to measure... It depends on your application, infrastructure, servers, hardware etc. So something that works somewhere doesn't automatically have to work for you.

          As mentioned in the initial answer it is a RPC over JMS which, throughput wise, might not be the most performant solution (it probably is the easiest). But as mentioned the only way to know for sure is to measure...

          Comment

          Working...
          X