0 Replies Latest reply on Feb 16, 2003 4:25 PM by Lyndon Livingstone

    UnknownHostException using MDB with Remote JMS Provider

    Lyndon Livingstone Newbie

      Using JB 2.4.10 with Tomcat 4.0.6

      I have a MDB that I want to use to listen to a topic on a remote server. The jboss.xml looks like this:

      <message-driven>
      <ejb-name>ejb/triversity/transactionware/asyncservicessite/RemoteConfiguratorMDB</ejb-name>
      <configuration-name>A Remote MDB Configuration</configuration-name>
      <destination-jndi-name>topic/transactionware-enterprise-async-services</destination-jndi-name>
      </message-driven>
      ...
      <container-configuration>
      <container-name>A Remote MDB Configuration</container-name>
      <call-logging>false</call-logging>
      <container-invoker>org.jboss.ejb.plugins.jms.JMSContainerInvoker</container-invoker>
      <container-interceptors>
      org.jboss.ejb.plugins.LogInterceptor
      org.jboss.ejb.plugins.SecurityInterceptor
      <!-- CMT -->
      org.jboss.ejb.plugins.TxInterceptorCMT
      org.jboss.ejb.plugins.MetricsInterceptor
      org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
      <!-- BMT -->
      org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
      org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
      org.jboss.ejb.plugins.MetricsInterceptor
      </container-interceptors>
      <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
      <instance-cache/>
      <persistence-manager/>
      <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
      <container-invoker-conf>
      ARemoteProvider
      StdJMSPool
      15
      1
      True

      10

      queue/DLQ
      5
      0


      </container-invoker-conf>
      <container-pool-conf>
      100
      10
      </container-pool-conf>
      </container-configuration>

      In jboss.jcml I have:


      ARemoteProvider
      some.server:1099
      org.jboss.jms.jndi.JBossMQProvider
      XAConnectionFactory
      XAConnectionFactory


      The problem is if <some.server> is not a real server or is not available I get an exception:

      [ERROR,MessageDrivenContainer] Serious error in init:
      java.net.UnknownHostException: some.server
      at java.net.InetAddress.getAllByName0(InetAddress.java:571)
      at java.net.InetAddress.getAllByName0(InetAddress.java:540)
      at java.net.InetAddress.getByName(InetAddress.java:449)
      at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:56)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:138)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:871)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:426)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:419)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.init(JMSContainerInvoker.java:470)
      at org.jboss.ejb.MessageDrivenContainer.init(MessageDrivenContainer.java:164)
      at org.jboss.ejb.Application.init(Application.java:204)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:373)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:307)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:487)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at org.jboss.deployment.AutoDeployer.startService(AutoDeployer.java:371)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:209)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)

      Can I get some more resiliency out of JBoss? I don't want my EAR to fail deployment if I can't reach the other JMS Provider. (I.e. the server is down or goes down unexpectedly)