4 Replies Latest reply on Jul 19, 2006 8:51 AM by crosenbury

    Message Driven with other JMS Provider

    crosenbury

      In Jboss 4.0.1, we used:

       <message-driven>
       <ejb-name>ActionPlansMonitorBean</ejb-name>
       <destination-jndi-name>evg.epam.actionplans.monitorcall</destination-jndi-name>
       <invoker-bindings>
       <invoker>
       <invoker-proxy-binding-name>sonic-message-driven-bean</invoker-proxy-binding-name>
       </invoker>
       </invoker-bindings>
       </message-driven>
      


      in the jboss.xml file to describe that we wanted our message driven bean to listen on the sonic bus rather than the standard JBoss JMS bus. Is there a way to provide this invoker proxy information to an MDB using annotations, or do I still need this xml in the new model?

        • 1. Re: Message Driven with other JMS Provider

          The thing to do would be to use Sonic's JMS/JCA adapter for this. This would allow you to integrate Sonic with JBoss without having to worry about extended configurations in your XML file. With EJB3, it's simply a matter of annotating the MDB appropriately to point to the appropriate RAR file.

          • 2. Re: Message Driven with other JMS Provider
            crosenbury

            Any chance you would know where there is documentation that describes how to do this?

            • 3. Re: Message Driven with other JMS Provider
              weston.price

              Sonic's documentation set, along with the adapter should be available on the Sonic site. At present, we do not provide documentation for this as of yet.

              • 4. Re: Message Driven with other JMS Provider
                crosenbury

                Through trial and error, as well as piecing together documentation, I have managed to get the Sonic rar to work. It involves:

                1) The Sonic rar must be deployed.
                2) The standardjboss.xml must have two entries:
                Invoker Proxy

                 <invoker-proxy-binding>
                 <name>Some Name Here</name>
                 <invoker-mbean>default</invoker-mbean>
                 <proxy-factory>org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory</proxy-factory>
                 <proxy-factory-config>
                 <endpoint-interceptors>
                 <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
                 <interceptor>org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor</interceptor>
                 <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
                 <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
                 </endpoint-interceptors>
                 </proxy-factory-config>
                 </invoker-proxy-binding>
                

                and
                <container-configuration>
                 <container-name>A configuration name here</container-name>
                 <call-logging>false</call-logging>
                 <invoker-proxy-binding-name>Invoker Proxy Name Here</invoker-proxy-binding-name>
                 <container-interceptors>
                 <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
                 <interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
                 <interceptor>org.jboss.ejb.plugins.RunAsSecurityInterceptor</interceptor>
                 <!-- CMT -->
                 <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
                 <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
                 <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                 <!-- BMT -->
                 <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                 <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
                 <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
                 <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>
                 </container-interceptors>
                 <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
                 <instance-cache></instance-cache>
                 <persistence-manager></persistence-manager>
                 <container-pool-conf>
                 <MaximumSize>100</MaximumSize>
                 </container-pool-conf>
                 </container-configuration>
                


                3) An entry in jboss.xml
                <enterprise-beans>
                 <message-driven>
                 <ejb-name>SonicQueueMDB</ejb-name>
                 <configuration-name>The configuration name here</configuration-name>
                 <resource-adapter-name>sonic-jms-ra.rar</resource-adapter-name>
                 </message-driven>
                 </enterprise-beans>
                


                What I cannot seem to figure out is how to specify the configuration name in the annotation. Any clues?