1 Reply Latest reply on Nov 18, 2005 7:14 PM by adrian.brock

    MDB & JBoss jboss-4.0.3SP1 + ActiveMQ 3.2

    ths2000

      Hi there,
      i am useing the ActiveMQ instead of the JBossMQ. The exchange of the MQ should has been correctly finished by now. I can send messages to a topic and receive them. But there is still a big problem. I am unable to use MDB's. At first i tryed to lunch a mdb wirtes data in a postgresql database (it allready worked but under JBossMQ). After getteing not even some exception i started thinging about the name of the topic, but the name of the topic in ejb-jar.xml and the one in the sender app are squaring.

      The problem could be caused by the xml files, i think.

      The ejb-jar.xml:

      <?xml version="1.0" encoding="US-ASCII"?>
      
      <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
       version="2.1">
      
       <description>
       A collection of simple EJBs for testing ActiveMQ integration with JBoss.
       </description>
      
       <enterprise-beans>
      
       <message-driven>
       <description>An MDB listening on a topic with a non-durable subscription.</description>
       <ejb-name>MyMbean</ejb-name>
       <ejb-class>de.package.OnMessageFromTopic</ejb-class>
       <messaging-type>javax.jms.MessageListener</messaging-type>
       <transaction-type>Container</transaction-type>
       <activation-config>
       <activation-config-property>
       <activation-config-property-name>destination</activation-config-property-name>
       <activation-config-property-value>topic.testTopic</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>acknowledgeMode</activation-config-property-name>
       <activation-config-property-value>Auto-acknowledge</activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>subscriptionDurability</activation-config-property-name>
       <activation-config-property-value>NonDurable</activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>messageSelector</activation-config-property-name>
       <activation-config-property-value/>
       </activation-config-property>
       </activation-config>
      
       </message-driven>
      
       </enterprise-beans>
      
       <assembly-descriptor>
       <container-transaction>
       <method>
       <ejb-name>MyMbean</ejb-name>
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
       </assembly-descriptor>
      </ejb-jar>
      



      and the jboss.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      
       <!DOCTYPE jboss PUBLIC
       "-//JBoss//DTD JBOSS 4.0//EN"
       "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
      
      <jboss>
       <jmx-name>activemq.rar:name=iTests</jmx-name>
       <enterprise-beans>
       <message-driven>
       <ejb-name>MyMbean</ejb-name>
       <resource-adapter-name>activemq-ra-3.2.rar</resource-adapter-name>
       <configuration-name>ActiveMQ Message Driven Bean</configuration-name>
       </message-driven>
       </enterprise-beans>
      
       <resource-managers>
       <resource-manager>
       <res-name>topicfactoryref</res-name>
       <res-jndi-name>java:/activemq/TopicConnectionFactory</res-jndi-name>
       </resource-manager>
       </resource-managers>
      
       <invoker-proxy-bindings>
       <invoker-proxy-binding>
       <name>activemq-message-driven-bean</name>
       <invoker-mbean>default</invoker-mbean>
       <proxy-factory>org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory</proxy-factory>
       <proxy-factory-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>ActiveMQ Message Driven Bean</container-name>
       <call-logging>true</call-logging>
       <invoker-proxy-binding-name>activemq-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>
      


      Or does anybody knows what else the problem could be? Please help me.

      Greetingz