5 Replies Latest reply on Aug 1, 2005 12:01 PM by Adrian Brock

    Problem with SwiftMQ integration

    Serge Dubakov Newbie

      I am trying to integrate intraVM SwiftMQ into JBoss AS 4.0.1sp1 according to this wiki entry: http://wiki.jboss.org/wiki/Wiki.jsp?page=InboundSwiftMQ. The problem I encountered is the following:

      2005-06-01 16:58:12,610 WARN [org.jboss.system.ServiceController] Problem starting servic
      e jboss.j2ee:service=EJB,plugin=invoker,binding=message-inflow-driven-bean,jndiName=local/
      RoutingRulesListenerBean
      org.jboss.deployment.DeploymentException: Error for ActivationSpec class com.swiftmq.conne
      ctor.v15.inbound.ActivationSpecImpl as JavaBean; - nested throwable: (java.beans.Introspec
      tionException: No property found for: ConnectionFactoryName on JavaBean: com.swiftmq.conne
      ctor.v15.inbound.ActivationSpecImpl@e6f711)

      (It's the same problem as stated here: http://www.jguru.com/forums/view.jsp?EID=1236640).

      I decompiled the com.swiftmq.connector.v15.inbound.ActivationSpecImpl and it seems like the ConnectionFactoryName property is there!

      What am I doing wrong? Thanks.

        • 1. Re: Problem with SwiftMQ integration
          Serge Dubakov Newbie

          Found out a solution.

          It is (seems to be) a bug in JBoss that while reading properties from activation-config in ejb-jar.xml first tries finding a property (in the mentioned ActivationSpec bean) with the same name that is specified in ejb-jar.xml and then with the first letter in uppercase. The problem is that Introspector wants the properties to be with first lower case letter.

          The RAR file provided with SwiftMQ (as well as some other I've seen) wants properties to be started with first upper case letter so Introspector never gets what it wants.

          The solution now is to patch the RAR to lowercase first letters of required properties and also use lowercase first letters in ejb-jar.xml activation-config properties.

          In the meantime JBoss's PropertyEditors could try to lowercase first letter itself...

          • 2. Re: Problem with SwiftMQ integration
            Adrian Brock Master

             

            "serge_dubakov" wrote:

            In the meantime JBoss's PropertyEditors could try to lowercase first letter itself...


            If it was a bug raise it on JIRA.
            I can tell you it is NOT a bug, besides the fact that this has been discussed before!!!!

            ActivationSpecs are javabeans, which means the property names need to follow
            javabean conventions.

            get/setSomething() -> something
            


            If you don't like the javabean convention, you can change it with a custom BeanInfo
            class.

            In the SwiftMQ case, the uppercase property name in the required properties
            of META-INF/ra.xml is wrong.

            • 3. Re: Problem with SwiftMQ integration
              Andreas Mueller Newbie

               

              "adrian@jboss.org" wrote:
              In the SwiftMQ case, the uppercase property name in the required properties
              of META-INF/ra.xml is wrong.


              Pardon me for jumping in here.

              I guess you are wrong, Adrian. You might check the examples for the JCA 1.5 spec, section 12.7:

              "A sample JMS resource adapter deployment descriptor":

              ...
              <!-- ResourceAdapter default configuration properties -->
              <config-property>
               <config-property-name>ServerName</config-property-name>
               <config-property-type>java.lang.String</config-property-type>
               <config-property-value>WombatServer</config-property-value>
              </config-property>
              <config-property>
               <config-property-name>PortNumber</config-property-name>
               <config-property-type>java.lang.Integer</config-property-type>
               <config-property-value>1050</config-property-value>
              </config-property>
              ...
              


              "A sample EJB 2.1 message-driven bean deployment descriptor"

              ...
              <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>
              ...
              


              That's the reason why our config property names start with upper case. This has been tested with all major app servers and it works fine.

              Just be a little more flexible in JBoss.

              Andreas Mueller
              SwiftMQ


              • 4. Re: Problem with SwiftMQ integration
                Andreas Mueller Newbie

                Added a comment to this Jira item:

                http://jira.jboss.com/jira/browse/JBAS-1850

                Andreas Mueller
                SwiftMQ

                • 5. Re: Problem with SwiftMQ integration
                  Adrian Brock Master

                   

                  "iit" wrote:

                  I guess you are wrong, Adrian. You might check the examples for the JCA 1.5 spec, section 12.7:


                  I am not wrong, since the examples are non-normative.
                  I guess we will have kludge our way around it, not because of the examples,
                  but because of the standard properties mentioned in the spec that are
                  "normative".

                  Incidently, your example of DestinationType is clearly wrong since the jca spec
                  (which actually defines these properties) uses lower case.

                   The connector architecture defines a set of well-defined
                   properties all of type java.lang.String. These are as
                   follows.
                  
                   ServerName
                   PortNumber
                   UserName
                   Password
                   ConnectionURL
                  


                  It should be (according to the javabean spec)
                  public void setDestination(String destination) -> property name destination
                  public void setURL(String url) -> property name URL

                  i.e. only repeated use of upper case letters causes the first character to be capitalized.