0 Replies Latest reply on Nov 11, 2007 10:52 PM by whafrog

    Error setting up weblogic mdb to monitor jboss queue

    whafrog

      Hi we're in the process of migrating all our apps off weblogic 7 to jboss 4.2. We can only do this one app at a time. A couple of the apps send messages to each other through weblogic's jms. We've finished migrating our first app to jboss (App1) and would like to send messages to the old weblogic app (App2). Now it gets sticky :-)

      Weblogic 7 does not have client jars, so to do any "pushing" from App1(jboss) to App2(weblogic) would require App1 to have the entire weblogic.jar file. Bad idea. So I was hoping to "pull" from App1 by using an MDB in App2 set up to monitor the App1 queue. We're already doing this successfully with another weblogic 7 app (monitoring a jboss 3.03 queue), so the setup should be the same.

      However, my MDB doesn't deploy due to a "no security manager" error. A wrinkle: weblogic 7 runs under jdk1.3.1, so I used the client jars from jboss 3.03, even though the app I'm connecting to is running under jboss 4.2.0GA. The JNDI properties (factories, etc) haven't changed. Should I be using the jboss 4.2 client jars even though my app runs on jdk1.3.1?

      I have also tried XAConnectionFactory, but with no success.

      The Error:

      2007-11-11 21:03:24,171 | logging.Logger:debug | Extracting SpyConnectionFactory from reference
      javax.naming.NamingException: Invalid reference. Error: org.jboss.mq.il.uil2.UILServerIL (no security manager: RMI class loader disabled)
       at org.jboss.mq.referenceable.ObjectRefAddr.extractObjectRefFrom(ObjectRefAddr.java:82)
       at org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.getObjectInstance(SpyConnectionFactoryObjectFactory.java:48)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:299)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:549)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
       at javax.naming.InitialContext.lookup(InitialContext.java:345)
       at weblogic.ejb20.internal.JMSConnectionPoller.getConnection(JMSConnectionPoller.java:516)
       at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:1643)
       at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:991)
       at weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling(JMSConnectionPoller.java:759)
       at weblogic.ejb20.deployer.MessageDrivenBeanPoolInfoImpl.start(MessageDrivenBeanPoolInfoImpl.java:213)
       at weblogic.ejb20.deployer.EJBDeployer.deployMessageDrivenBeans(EJBDeployer.java:1524)
       at weblogic.ejb20.deployer.EJBDeployer.start(EJBDeployer.java:1381)
       at weblogic.ejb20.deployer.EJBModule.start(EJBModule.java:404)
       at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:983)
       at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:969)
       at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:619)
       at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:376)
       at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:235)
       at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61)
       at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:806)
       at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:295)
       at weblogic.Server.main(Server.java:32)


      ejb-jar.xml:

      <message-driven>
       <ejb-name>AMessageBean</ejb-name>
       <ejb-class>com.something.somewhere.ambd.AMessageBean</ejb-class>
       <transaction-type>Container</transaction-type>
       <message-selector>Destination='App2'</message-selector>
       <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
       <message-driven-destination>
       <destination-type>javax.jms.Queue</destination-type>
       </message-driven-destination>
       </message-driven>



      weblogic-ejb-jar.xml:

      <weblogic-enterprise-bean>
       <ejb-name>AMessageBean</ejb-name>
       <message-driven-descriptor>
       <pool>
       <max-beans-in-free-pool>10</max-beans-in-free-pool>
       <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
       </pool>
       <destination-jndi-name>queue/AQueue</destination-jndi-name>
       <initial-context-factory>org.jnp.interfaces.NamingContextFactory</initial-context-factory>
       <provider-url>jnp://localhost:1099</provider-url>
       <connection-factory-jndi-name>ConnectionFactory</connection-factory-jndi-name>
       </message-driven-descriptor>
       <jndi-name>jms/AMessageBean</jndi-name>
       </weblogic-enterprise-bean>


      Any help, or alternate communication suggestions, would be appreciated. Thanks!