1 2 Previous Next 15 Replies Latest reply on Apr 5, 2010 9:30 PM by rajsoni

    Problem integrating Weblogic 8.1 JMS with Jboss 5.1

    rajsoni

      Hello Everyone,

       

      Am trying to set up Weblogic8.1 as the JMS provider for Jboss 5.1.

      Based on my findings and understanding of the changes needed to achieve this,I'have made the following changes :

       

      jms-ds.xml:

       

         <mbean code="org.jboss.jms.jndi.JMSProviderLoader"

              name="jboss.mq:service=JMSProviderLoader,name=WLJMSProvider">

            <attribute name="ProviderName">WLJMSProvider</attribute>

            <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

            <attribute name="QueueFactoryRef">weblogicjms</attribute>

            <attribute name="TopicFactoryRef">weblogicjms</attribute>

          </mbean>

       

         <no-tx-connection-factory>

            <jndi-name>WLJMS</jndi-name>

            <rar-name>jms-ra.rar</rar-name>

            <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>

            <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property>

            <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/WLJMSProvider</config-property>

            <max-pool-size>20</max-pool-size>

         </no-tx-connection-factory>

       

      jboss-service.xml:

       

      <mbean code="org.jboss.naming.ExternalContext"

         name="DefaultDomain:service=ExternalContext,jndiName=weblogicjms">

         <attribute name="JndiName">weblogicjms</attribute>

         <attribute name="Properties">

         java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory

         java.naming.provider.url=t3://remotehost:7001

         java.naming.security.authentication=none

         </attribute>

         <attribute name="InitialContext">javax.naming.InitialContext</attribute>

         </mbean>

       

      Also added the weblogic.jar in the default/server/lib folder in Jboss.When I start Jboss after making these changes I see that the Jboss server is able to bind to the queue on remote server.

      However,for the MDB,which is deployed on the Jboss server I see the following error while  activation:

       

       

      16:32:41,661 INFO  [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@7fd7c1(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@dee999 destination=java:WLJMS/QUEUE.MARKET destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)

      16:32:41,662 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@7fd7c1(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@dee999 destination=java:WLJMS/QUEUE.MARKET destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)

      javax.naming.NameNotFoundException: DefaultJMSProvider not bound

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)

      at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

      at org.jnp.server.NamingServer.lookup(NamingServer.java:443)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)

      at javax.naming.InitialContext.lookup(InitialContext.java:409)

      at org.jboss.util.naming.Util.lookup(Util.java:222)

      at org.jboss.util.naming.Util.lookup(Util.java:182)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupJMSProviderAdapter(JmsActivation.java:397)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:346)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)

      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)

      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

      at java.lang.Thread.run(Thread.java:636)

       

       

      Here's how the jboss.xml looks like for the MDB causing the problem while activation:

       

      *********************************************************************************************************************************************************

      <?xml version="1.0"?>
      <!DOCTYPE jboss PUBLIC
            "-//JBoss//DTD JBOSS 5.0//EN"
            "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">

      <jboss>
          <enterprise-beans>
      <message-driven>
        <ejb-name>ProcessMDB</ejb-name>
         <destination-jndi-name>java:WLJMS/QUEUE.MARKET</destination-jndi-name>
                  <local-jndi-name>local/ProcessMDB</local-jndi-name>
                  <configuration-name>WeblogicRemoteMessageDrivenBean</configuration-name>
      </message-driven>
             
          </enterprise-beans>

          <invoker-proxy-bindings>
              <invoker-proxy-binding>
                 <name>wl-mdb-invoker</name>
                 <invoker-mbean>default</invoker-mbean>
                 <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                 <proxy-factory-config>
                 <JMSProviderAdapterJNDI>java:/WLJMS</JMSProviderAdapterJNDI>
                 <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
                 <CreateJBossMQDestination>false</CreateJBossMQDestination>
                 <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
                 <MinimumSize>1</MinimumSize>
                 <MaximumSize>15</MaximumSize>
                 <KeepAliveMillis>30000</KeepAliveMillis>
                 <MaxMessages>1</MaxMessages>
                 <MDBConfig>
                 <ReconnectIntervalSec>10</ReconnectIntervalSec>
                 <DLQConfig>
                 <DestinationQueue>queue/DLQ</DestinationQueue>
                 <MaxTimesRedelivered>10</MaxTimesRedelivered>
                 <TimeToLive>0</TimeToLive>
                 </DLQConfig>
                </MDBConfig>
                </proxy-factory-config>
              </invoker-proxy-binding>
          </invoker-proxy-bindings>

         
          <container-configurations>
              <container-configuration>
                  <container-name>WeblogicRemoteMessageDrivenBean</container-name>
                  <call-logging>false</call-logging>
                  <invoker-proxy-binding-name>wl-mdb-invoker</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>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
                     <interceptor>org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
                     <interceptor>org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                     <!-- BMT -->
                     <interceptor>org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                     <interceptor>org.jboss.ejb.plugins.MessageDrivenTxInterceptorBM</interceptor>
                     <interceptor>org.jboss.ejb.plugins.CallValidationInerceptor</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>

          </container-configurations>

       

      Am not sure why it's trying to bind to the Default JMSprovider still instead of the WLJMSProvider that I have set up for this...

      Have tried other options as well like making the changes for invokder binding in the standard-jboss.xml as well but havent found

      the solution yet...

       

      Can anyone help me with this issue?

      thanks for your help in advance!!!

        • 1. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
          farhanhh

          Hi, were you able to find a solution to this?

          • 2. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
            rajsoni

            yes...I used JMSJCA finally and was able to integrate Weblogic 8.1 JMS with Jboss5.1...

            • 3. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
              farhanhh

              Great, do you mind sharing your configuration and some of the specifics please?

              • 4. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                rajsoni

                sure..np....Here you go....:

                jms-ds.xml:

                 

                <?xml version="1.0" encoding="UTF-8"?>

                 

                <connection-factories>

                 

                  <!-- ==================================================================== -->

                  <!-- JMS Stuff                                                            -->

                  <!-- ==================================================================== -->

                 

                   <!--

                   The JMS provider loader. Currently pointing to a non-clustered ConnectionFactory. Need to

                   be replaced with a clustered non-load-balanced ConnectionFactory when it becomes available.

                   See http://jira.jboss.org/jira/browse/JBMESSAGING-843.

                   -->

                   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"

                      name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">

                      <attribute name="ProviderName">DefaultJMSProvider</attribute>

                      <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

                    <!--  <attribute name="QueueFactoryRef">weblogicjms</attribute>

                      <attribute name="TopicFactoryRef">weblogicjms</attribute>-->

                     <attribute name="FactoryRef">XAConnectionFactory</attribute>

                     <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>

                     <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>

                     <attribute name="Properties">

                     java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory

                     java.naming.provider.url=t3://linux-soni.dev.themunicenter.com:7001

                     java.naming.security.authentication=none

                     </attribute>

                </mbean>

                 

                    <no-tx-connection-factory>

                      <jndi-name>CFX/ExternalConnectionFactory</jndi-name>

                      <xa-transaction />

                      <track-connection-by-tx />

                      <rar-name>sun-jms-adapter.rar</rar-name>

                  <!--    <connection-definition>javax.jms.QueueConnectionFactory </connection-definition>

                      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property> -->

                      <connection-definition>javax.jms.TopicConnectionFactory </connection-definition>

                      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>

                      <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>

                      <config-property name="Destination" type="java.lang.String">javax.jms.Destination</config-property>

                      <config-property name="ConnectionURL" type="java.lang.String"><![CDATA[t3://10.9.10.164:7001/?JMSJCA.WLFACTORY=TOPIC.MARKUPMARKET&prefix=jms/destinations;JMSJCA.NoXA=true]]></config-property>

                        <min-pool-size>1</min-pool-size>

                       <max-pool-size>200</max-pool-size>

                        <blocking-timeout-millis>30000</blocking-timeout-millis>

                        <idle-timeout-minutes>3</idle-timeout-minutes>

                        </no-tx-connection-factory>

                </connection-factories

                                                                                                                  

                Change to queue or topic as per your need...above...:

                 

                Change in MDB : jboss.xml:

                 

                <?xml version="1.0"?>
                <!DOCTYPE jboss PUBLIC
                      "-//JBoss//DTD JBOSS 5.0//EN"
                      "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">

                <jboss>
                    <enterprise-beans>
                <message-driven>
                  <ejb-name>MktMessageProcessorMDB</ejb-name>
                   <destination-jndi-name>java:/CFX/ExternalConnectionFactory</destination-jndi-name>
                            <local-jndi-name>local/MktMessageProcessorMDB</local-jndi-name>
                        <resource-adapter-name>sun-jms-adapter.rar</resource-adapter-name>
                        <configuration-name>JMSJCA Message Driven Bean</configuration-name>
                </message-driven>

                   <invoker-proxy-bindings>
                        <invoker-proxy-binding>
                        <name>jmsjca-message-driven-bean</name>
                        <invoker-mbean>default</invoker-mbean>
                        <proxy-factory>org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory</proxy-factory>
                        <proxy-factory-config>
                        <activation-config>
                        <activation-config-property>
                             <activation-config-property-name>providerAdapterJNDI</activation-config-property-name>
                             <activation-config-property-value>java:/DefaultJMSProvider</activation-config-property-value>
                         </activation-config-property>
                            <activation-config-property>
                                 <activation-config-property-name>ConnectionURL</activation-config-property-name>
                                 <activation-config-property-value>t3://linux-soni.dev.themunicenter.com:7001</activation-config-property-value>
                             </activation-config-property>
                         </activation-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>
                    </invoker-proxy-bindings>

                    <container-configurations>
                        <container-configuration>
                            <container-name>JMSJCA Message Driven Bean</container-name>
                            <call-logging>false</call-logging>
                            <invoker-proxy-binding-name>jmsjca-message-driven-bean</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" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</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 transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</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>
                    </container-configurations>

                </jboss>

                 

                ejb-jar.xml:

                 

                <?xml version="1.0"?>
                <ejb-jar>
                <enterprise-beans>
                  <message-driven>
                   <ejb-name>MktMessageProcessorMDB</ejb-name>
                   <ejb-class>com.muni.core.messaging.mktmessageprocessor.MktMessageProcessorBean</ejb-class>
                   <transaction-type>Bean</transaction-type>
                   <acknowledge-mode>auto-acknowledge</acknowledge-mode>
                            <activation-config>
                                <activation-config-property>
                                    <activation-config-property-name>concurrencyMode</activation-config-property-name>
                                    <activation-config-property-value>cc</activation-config-property-value>
                                </activation-config-property>
                                <activation-config-property>
                                    <activation-config-property-name>endpointPoolMaxSize</activation-config-property-name>
                                    <activation-config-property-value>10</activation-config-property-value>
                                </activation-config-property>
                                <activation-config-property>
                                    <activation-config-property-name>destination</activation-config-property-name>
                                    <activation-config-property-value>TOPIC.MARKUPMARKET</activation-config-property-value>
                                </activation-config-property>
                                <activation-config-property>
                                    <activation-config-property-name>destinationType</activation-config-property-name>
                                    <activation-config-property-value>javax.jms.Topic</activation-config-property-value>
                                </activation-config-property>
                                <activation-config-property>
                                    <activation-config-property-name>contextName</activation-config-property-name>
                                    <activation-config-property-value>XContextName</activation-config-property-value>
                                </activation-config-property>
                            </activation-config>
                  </message-driven>
                </enterprise-beans>

                </ejb-jar>

                • 5. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                  farhanhh

                  Thanks for shring this with us. Do you mind creating a wiki for this? If not do you mind if I placed this information on a wiki? I think this is really helpful for those struggling with direct JMS integration with JBoss and Weblogic as a foriegn JMS provider.

                  • 6. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                    timfox

                    Farhan Hussain wrote:

                     

                    Thanks for shring this with us. Do you mind creating a wiki for this? If not do you mind if I placed this information on a wiki? I think this is really helpful for those struggling with direct JMS integration with JBoss and Weblogic as a foriegn JMS provider.

                    Why don't you create a wiki page?

                    • 7. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                      farhanhh

                      Yes I will be happy too, but I don't want to take credit for someone else's work in this case. So just want to make sure that it is ok with him...

                      • 8. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                        rajsoni

                        thanks Farhan!I myself feel that I owe the forums/comminity since I too have got helpful hints during my research from the forums.......will put this on wiki soon with proper description of steps by Monday when I reach office..

                        • 9. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                          rajsoni

                          Farhan/Tom,

                           

                          Have tried putting this on Wikipedia...seems the Admins at Wiki have some concerns mentioning the how-to things may not be put on Wiki ...Have tried explaining to them, the need for this information on Wiki.......

                           

                          http://en.wikipedia.org/wiki/Integrating_weblogic_8.1_jms_with_Jboss_5.1

                           

                          It's under consideration for deletion anyways...May be some voice from the users might help retain it there....

                          Else will put this at the other place suggested in the discussion at Wiki page...(Wikibooks)

                          • 10. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                            farhanhh

                            Hi Raj;

                             

                            You can put this information up on jboss.org. You can create a new article as a wiki here.

                            • 11. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                              jaikiran

                              rajsoni wrote:

                               

                              Farhan/Tom,

                               

                              Have tried putting this on Wikipedia...seems the Admins at Wiki have some concerns mentioning the how-to things may not be put on Wiki ...Have tried explaining to them, the need for this information on Wiki.......

                               

                              http://en.wikipedia.org/wiki/Integrating_weblogic_8.1_jms_with_Jboss_5.1

                               

                              It's under consideration for deletion anyways...May be some voice from the users might help retain it there....

                              Else will put this at the other place suggested in the discussion at Wiki page...(Wikibooks)

                              You can always use the JBoss community wiki http://community.jboss.org/en/wiki to add these kind of articles. The best sub-section for this article would be here http://community.jboss.org/en/jbossmessaging/dev?view=documents

                              • 12. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                                rajsoni

                                thanks!will do....!!

                                • 13. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                                  timfox

                                  Yes, when I meant create a wiki page, I meant on the jboss.org wiki, not wikipedia!

                                  • 14. Re: Problem integrating Weblogic 8.1 JMS with Jboss 5.1
                                    rajsoni

                                    yes Tom..got that after replies from Farhan and Jai...thnx!

                                    1 2 Previous Next