The first solution I tried is to host a mdb on jboss to connect to weblogic. 
There is a successful case posted in jboss wiki 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3939722#3939722
How stupid I am, just can't make it work after followed and it is a post 2 
years ago so I don't expect people would answer there. 

** First thing I do is to config a remote JMS provider in jboss. Edited the 
jboss_home/server/default/deploy/jms/jms-ds.xml and inlcuded the following 
there. 

  
    WLJMSProvider
    org.jboss.jms.jndi.JNDIProviderAdapter
    TestConnectionFactory
    TestConnectionFactory
    
       java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
       java.naming.provider.url=t3://localhost:14001
    
  

** Then edited the jboss_home/server/default/conf/standardjboss.xml
    <invoker-proxy-binding>
         wl-mdb-invoker
         <invoker-mbean>default</invoker-mbean>
         
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
         <proxy-factory-config>
            WLJMSProvider
            StdJMSPool
            1
            30000
            15
            1
            
               10
               
                  queue/DLQ
                  10
                  0
               
            
         </proxy-factory-config>
    </invoker-proxy-binding>

    <container-configuration>
      <container-name>Weblogic Remote Message Driven Bean</container-name>
      <call-logging>false</call-logging>
      <invoker-proxy-binding-name>wl-mdb-invoker</invoker-proxy-binding-name>
      <container-interceptors>
        org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
        org.jboss.ejb.plugins.LogInterceptor
        org.jboss.ejb.plugins.RunAsSecurityInterceptor
        <!-- CMT -->
        org.jboss.ejb.plugins.TxInterceptorCMT
        org.jboss.ejb.plugins.CallValidationInterceptor
        org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
        <!-- BMT -->
        org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
        org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
        org.jboss.ejb.plugins.CallValidationInterceptor
        org.jboss.resource.connectionmanager.CachedConnectionInterceptor
      </container-interceptors>
      
<instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
      <instance-cache></instance-cache>
      <persistence-manager></persistence-manager>
      <container-pool-conf>
        100
      </container-pool-conf>
    </container-configuration>


** and in my mdb jboss.xml

    <enterprise-beans>
        <message-driven>
            <ejb-name>Mdb1</ejb-name>
            <destination-jndi-name>TestQueue1</destination-jndi-name>
            <!--destination-jndi-name>queue/testQueue</destination-jndi-name-->
            <invoker-bindings>
                      
                    
<invoker-proxy-binding-name>wl-mdb-invoker</invoker-proxy-binding-name>
                    
<!--invoker-proxy-binding-name>mymessage-driven-bean</invoker-proxy-binding-name-->
                
            </invoker-bindings>
        </message-driven>
    </enterprise-beans>



** And the result, it failed with the following exception 
13:59:46,421 WARN  [JMSContainerInvoker] JMS provider failure detected:
org.jboss.deployment.DeploymentException: Error during queue setup; - nested 
throwable: (weblogic.jms.common.IllegalStateException: connection consume
r only supported on server)
        at 
org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:39)
        at 
org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:907)
        at 
org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:933)
        at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
        at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
Caused by: weblogic.jms.common.IllegalStateException: connection consumer only 
supported on server
        at 
weblogic.jms.client.JMSConnection.createConnectionConsumer(JMSConnection.java:744)
        at 
weblogic.jms.client.JMSConnection.createConnectionConsumer(JMSConnection.java:479)
        at 
org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:891)
        ... 155 more




According to the folks in weblogic forum said ConnectionConsumer can only run 
in weblogic server. I tried to modify the JMSContainerInvoker and skipped all 
the ConnectionConsumer.  I see the the MDB can connect to the weblogic as I 
added some printout for the "event" param in the 
JMSContainerInvoker.sendNotification
** org.jboss.ejb.plugins.jms.CONNECTING
** org.jboss.ejb.plugins.jms.CONNECTED

I do a netstat -a | grep 14001 and see an pair of additional connection is 
connecting of my 14001 weblogic port.
and when I close the weblogic instance. the Jboss would throw 
weblogic.jms.common.LostServerException: weblogic.rjvm.PeerGoneException: ; 
nested exception is:
        weblogic.utils.net.SocketResetException - with nested exception:
[java.net.SocketException: Connection reset]
        at weblogic.jms.client.JMSConnection.jmsPeerGone(JMSConnection.java:917)
        at 
weblogic.jms.dispatcher.DispatcherWrapperState.peerGone(DispatcherWrapperState.java:703)
        at 
weblogic.jms.dispatcher.DispatcherWrapperState.callback(DispatcherWrapperState.java:562)
        at 
weblogic.rjvm.RJVMImpl$HeartbeatMonitorListenerDeliverer.execute(RJVMImpl.java:1554)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

and the JMSContainerInvoker would sendNotification with event  
** org.jboss.ejb.plugins.jms.DISCONNECTING

and jboss keeps on reconnecting, but fail with exception
Caused by: java.net.ConnectException: t3://localhost:14001: Destination 
unreachable; nested exception is:
        java.net.ConnectException: Connection refused: connect; No available 
router to destination

so I assumed the jboss & weblogic connectivity is established with the update 
the JMSContainerInvoker by commenting out all the ConnectionConsumer code. 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939731#3939731

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939731


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to