1 Reply Latest reply on Aug 30, 2010 1:16 AM by jaikiran

    Enterprise-bean entry in standardjboss.xml in Jboss 5.1.0

    swarup.anand

      Hello everyone

       

      In my project we are upgrading to Jboss 5.1.0 and we are using Joram for the Mesaging service. I have the following doubt. I am trying to make an entry of the enterprise-beans of the MDB in the standardjboss.xml file along with the custom container configuration and invoker proxy binding. In this case I am getting the following errors

       

       

       

      19:58:47,466 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:binding=message-driven-bean,jndiName=local/ser_sgr_stn@30848601,plugin=invoker,service=EJB state=Create mode=Manual requiredState=Installed
      org.jboss.deployment.DeploymentException: Unable to create activation spec ra=jboss.jca:service=RARDeployment,name='jms-ra.rar' messaging-type=javax.jms.MessageListener properties={}
              at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:52)
              at org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:454)
              at org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory.startService(JBossMessageEndpointFactory.java:198)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
              at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
              at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
              at $Proxy38.start(Unknown Source)
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
              at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
              at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
              at org.jboss.system.ServiceController.start(ServiceController.java:460)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:267)
              at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:282)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
              at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
              at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
              at $Proxy38.start(Unknown Source)
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
              at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
              at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
              at org.jboss.system.ServiceController.start(ServiceController.java:460)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:267)
              at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:282)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
              at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
              at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
              at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
              at $Proxy38.start(Unknown Source)
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
              at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
              at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      

       

      But the moment I remove the entries from the standardjboss.xml and put them in the jboss.xml the MDB start working fine and I have no issues.

       

      The requirement I have is I cannot have the entry in jboss.xml as my application ear is seperately deployed in 63 destinations and my MDB details are unique to their destinations.

       

      If I put the jboss.xml in the application then I will have to build 63 different ear.

       

      In Jboss 4.2.3 the entry was kept in the standard jboss.xml file and the MDB's worked fine.

       

      If I can simulate the same in the Jboss 5.1.0 Thn I can atleast avoid the multiple ear problem.

       

      The ejb-jar.xml file entry (just a single sample entry)

       

      <message-driven>
                       
               <ejb-name>ser_mao_stn</ejb-name>
               <ejb-class>com.krcl.rap.ejb.qmanager.StnSendMDB</ejb-class>
               <transaction-type>Container</transaction-type>
               <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
               <message-driven-destination>
               <destination-type>javax.jms.Queue</destination-type>
               </message-driven-destination>
                             
            </message-driven>
      

       

       

      The jboss.xml (just a single sample entry)

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      
      <jboss>
      
      <enterprise-beans>
      
       <message-driven>
      
         <ejb-name>ser_mao_stn</ejb-name>
      
         <configuration-name>Sending Message Driven Bean</configuration-name>
      
         <destination-jndi-name>ser_mao_stn</destination-jndi-name>
      
       </message-driven>
      
      </enterprise-beans>
      
      
      <container-configurations>
       <container-configuration>
               <container-name>Sending Message Driven Bean</container-name>
               <call-logging>false</call-logging>
               <invoker-proxy-binding-name>Sending-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>
                  <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
                  <!--<interceptor transaction="Container" metricsEnabled="false">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>-->
              <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>    
                  <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                  <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                  <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
                  <!--<interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</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>1</MaximumSize>
               </container-pool-conf>
            </container-configuration>
      
            <container-configuration>
               <container-name>Receiving Message Driven Bean</container-name>
               <call-logging>false</call-logging>
               <invoker-proxy-binding-name>Receiving-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>
                     <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
                     <!--<interceptor transaction="Container" metricsEnabled="false">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>-->
                     <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
                     <interceptor transaction="Container">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                     <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor</interceptor>
                     <interceptor transaction="Bean">org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT</interceptor>
                     <!--<interceptor transaction="Bean" metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</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>1</MaximumSize>
               </container-pool-conf>
            </container-configuration>
      
      
      
        </container-configurations>
      <invoker-proxy-bindings>
      <invoker-proxy-binding>
               <name>Sending-message-driven-bean</name>
               <invoker-mbean>default</invoker-mbean>
               <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
               <proxy-factory-config>
                  <JMSProviderAdapterJNDI>JoramJMSProvider</JMSProviderAdapterJNDI>
                  <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
                  <MinimumSize>1</MinimumSize>
                  <MaximumSize>1</MaximumSize>
                  <KeepAliveMillis>30000</KeepAliveMillis>
                  <MaxMessages>1</MaxMessages>
                  <MDBConfig>
                     <ReconnectIntervalSec>10</ReconnectIntervalSec>
                      <!--DLQConfig>
                         <DestinationQueue>dmq1</DestinationQueue>
                         <MaxTimesRedelivered>10</MaxTimesRedelivered>
                         <TimeToLive>0</TimeToLive>
                      </DLQConfig-->
                  </MDBConfig>
               </proxy-factory-config>
            </invoker-proxy-binding>
      
            <invoker-proxy-binding>
               <name>Receiving-message-driven-bean</name>
               <invoker-mbean>default</invoker-mbean>
               <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
               <proxy-factory-config>
                  <JMSProviderAdapterJNDI>JoramJMSProvider</JMSProviderAdapterJNDI>
                  <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
                  <MinimumSize>1</MinimumSize>
                  <MaximumSize>1</MaximumSize>
                  <KeepAliveMillis>30000</KeepAliveMillis>
                  <MaxMessages>1</MaxMessages>
                  <MDBConfig>
                     <ReconnectIntervalSec>10</ReconnectIntervalSec>
                      <!--<DLQConfig>
                         <DestinationQueue>dmq1</DestinationQueue>
                         <MaxTimesRedelivered>10</MaxTimesRedelivered>
                         <TimeToLive>0</TimeToLive>
                      </DLQConfig>-->
                  </MDBConfig>
               </proxy-factory-config>
            </invoker-proxy-binding>
      </invoker-proxy-bindings>
      
      
      </jboss>
      

       

       

      This entry in the jboss.xml needs to be transfered to teh standardjboss.xml file.

       

      Please help me as this is very urgent.

       

      Thanks in advance people.

       

      PS. Sorry If the details given by me are littl. I am new to such an R&D work and to this community too. If any further clarrifications is requried please do ask and I shall provide the same.