1 Reply Latest reply on Oct 12, 2004 10:07 AM by Adrian Brock

    Does JBOSS 4.0 support the

    shoegoo Newbie

      Hello

      This Topic is related to this one:
      "TODO: Message Inflow JmsRA"
      http://www.jboss.org/index.html?module=bb&op=viewtopic&t=48672

      I'm working on a JCA-RA for "my-company-home-made" messaging system.
      I'm want to use the Message Inflow mechanism but without the use of JMS.
      This is specified in the J2EE Architecture Specification, in chapter 12.8.

      I'm using JBOSS 4.0 since it's EJB 2.1 and JCA 1.5 compliant.


      The goal is to implement a specific non-jms listener for my messaging system.
      Then to deploy the RA and a MDB that listen on this specific listener

      The code is done.
      I've got a problem for connecting the MDB on my specific-listener.


      I specify my listener in my Ressource Adapter Deployment Descriptor (RA-DD):

      <?xml version="1.0" encoding="UTF-8"?>
      <connector 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/connector_1_5.xsd" version="1.5">
      
      <....>
      
       <resourceadapter>
       <resourceadapter-class>
       com.prosodie.mim.jcaAdapter.MimResourceAdapter
       </resourceadapter-class>
      
       <!-- ResourceAdapter default configuration properties -->
       <config-property>
       <config-property-name>MimTestString</config-property-name>
       <config-property-type>java.lang.String</config-property-type>
       <config-property-value>Message de test mim-j2ee</config-property-value>
       </config-property>
      
       <!-- The inbound resource adapter description -->
       <inbound-resourceadapter>
       <messageadapter>
       <messagelistener>
       <messagelistener-type>
       com.prosodie.mim.jcaAdapter.MimMessageListener
       </messagelistener-type>
       <activationspec>
       <activationspec-class>
       com.prosodie.mim.jcaAdapter.MimActivationSpec
       </activationspec-class>
       <required-config-property>
       <config-property-name>mimDebugMode</config-property-name>
       </required-config-property>
       <required-config-property>
       <config-property-name>mimRcpQueueName</config-property-name>
       </required-config-property>
       </activationspec>
       </messagelistener>
       </messageadapter>
       </inbound-resourceadapter>
       </resourceadapter>
      </connector>
      



      Then I create a simple MDB. Its DD also contains the reference of my listener:
      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
       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">
       <display-name xml:lang="fr">MJAMDB</display-name>
       <enterprise-beans>
       <message-driven>
       <display-name>MJAMDB</display-name>
       <ejb-name>MJAMDB</ejb-name>
       <ejb-class>
       com.prosodie.mim.jcaAdapter.mdb.MJAMDB
       </ejb-class>
       <messaging-type>
       com.prosodie.mim.jcaAdapter.MimMessageListener
       </messaging-type>
       <transaction-type>Container</transaction-type>
       <activation-config>
       <activation-config-property>
       <activation-config-property-name>
       mimDebugMode
       </activation-config-property-name>
       <activation-config-property-value>
       31
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       mimRcpQueueName
       </activation-config-property-name>
       <activation-config-property-value>
       jessicaMimQueue
       </activation-config-property-value>
       </activation-config-property>
       </activation-config>
       </message-driven>
       </enterprise-beans>
       <assembly-descriptor>
       <container-transaction>
       <method>
       <ejb-name>MJAMDB</ejb-name>
       <method-name>onMessage</method-name>
       <method-params>
       <method-param>java.lang.String</method-param>
       </method-params>
       </method>
       <trans-attribute>NotSupported</trans-attribute>
       </container-transaction>
       </assembly-descriptor>
      </ejb-jar>
      




      The problem is that when JBOSS deploys the MDB, it warns me of several problems.
      The following is from the server.log (I skipped the "DEBUG" lines):

      2004-10-01 19:29:35,894 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Starting failed

      jboss.j2ee:binding=message-driven-bean,jndiName=local/MJAMDB,plugin=invoker,service=EJB
      org.jboss.deployment.DeploymentException: Unknown destination-type java.lang.String



      So after a quick investigation on JBoss sources it looks like:

      1- JBOSS is looking for the <message-driven-destination> tag in the MDB-DD
      but this is not in the EJB-2.1 Descriptor schema anymore
      see: http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd

      2- JBOSS is using a default <destination-type> for the MDB if none is specified
      while this information is optional for EJB 2.1
      And more it creates a default resource for this destination:
      a default topic named after the name of the MDB

      3- JBOSS is not able to link a MDB to a listener if it's not a JMS-listener


      SO to conclude:

      1- JBOSS should not warn me if it does not find the <> tag because it's not EJB 2.1

      2- JBOSS should not create a default JMS destination is there is none in the MDB-DD
      because I just want to use my specific listener

      3- JBOSS should then redirect messages arriving in my Connector via my listener
      to the MDB that declares it in their DD. This using the "onMessage()" method.

      But for me it's not working.
      So do I have a problem, or is this a bug?

      Thanks for your help as far as I think that it could be a major problem.

      --
      Mansuy DEJEAN