12 Replies Latest reply on Mar 12, 2008 3:59 PM by lafbarbosa

    Configuration for jms-jca-provider

    lafbarbosa

      Hi people,

      Please, I would like to see an example of JCA configuration. I have seen the XSD, but an example would be better. I didn't find anyone in the Internet.

      That's the XSD:
      <xsd:element name="jms-jca-provider" substitutionGroup="jesb:provider">
      <xsd:annotation>
      <xsd:documentation xml:lang="en">
      A specific instance of a provider, providing JMS through JCA inflow.
      </xsd:documentation>
      </xsd:annotation>
      <xsd:complexType>
      <xsd:complexContent>
      <xsd:extension base="jesb:jms-provider-type">
      <xsd:sequence>
      <xsd:element maxOccurs="1" minOccurs="0" ref="jesb:activation-config"/>
      </xsd:sequence>
      <xsd:attribute name="adapter" type="xsd:string">
      <xsd:annotation>
      <xsd:documentation xml:lang="en">
      The artifact containing the resource
      adapter.
      </xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="endpointClass" type="xsd:string">
      <xsd:annotation>
      <xsd:documentation xml:lang="en">
      The class name of the JCA endpoint.
      </xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="messagingType" type="xsd:string">
      <xsd:annotation>
      <xsd:documentation xml:lang="en">
      The class name of the messaging specific
      interface.
      </xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="jcaBridge" type="xsd:string">
      <xsd:annotation>
      <xsd:documentation xml:lang="en">
      The class name of the JCA Bridge.
      </xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="transacted" type="xsd:boolean">
      <xsd:annotation>
      <xsd:documentation xml:lang="en">
      The transacted flag.
      </xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="providerAdapterJNDI" type="xsd:string">
      <xsd:annotation>
      <xsd:documentation xml:lang="en">
      The JNDI location of an alternate provider adapter
      </xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      </xsd:extension>
      </xsd:complexContent>
      </xsd:complexType>
      </xsd:element>

      Thanks in advance!

      Luiz

        • 1. Re: Configuration for jms-jca-provider
          beve

          Hi Luiz,

          there is a quickstart named jms_transacted in the main trunk that shows an example of the jms-jca-provider.
          The following is taken from its jboss-esb.xml:

          <providers>
           <jms-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory"
           jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
           jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
          
           <jms-bus busid="quickstartGwChannel">
           <jms-message-filter
           dest-type="QUEUE"
           dest-name="queue/quickstart_jms_transacted_Request_gw"
           transacted="true"
           />
           </jms-bus>
           <jms-bus busid="quickstartEsbChannel">
           <jms-message-filter
           dest-type="QUEUE"
           dest-name="queue/quickstart_jms_transacted_Request_esb"
           transacted="true"
           />
           </jms-bus>
           <activation-config>
           <!-- The maximum number of times a message is redelivered before it is sent to the DLQ -->
           <property name="dLQMaxResent" value="5"/>
           </activation-config>
          
           </jms-jca-provider>
           </providers>
          


          Regards,

          Daniel

          • 2. Re: Configuration for jms-jca-provider
            lafbarbosa

            Hi Daniel,

            This example (jms_transacted) is the basic example that can be built to a jms-jca-provider?

            I ask you because, please, I would like to see something with the only required tags and attributes or, at least, that with the most useable tags and its attributes.

            That's because I need to have an idea of the easiest or most useable way for each one tag from jboss-esb.xml to use the Servlets that handle these files to read them from my web application.

            So, if you or anybody can help me to enumerate some of that cases that we can't find in the documentation, I'll appreciate it.

            Thanks in advance!

            Regards,

            Luiz

            • 3. Re: Configuration for jms-jca-provider
              lafbarbosa

              Only to compare, I found the following code (in this URL: http://viewvc.jboss.org/cgi-bin/viewvc.cgi/labs/labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/services/jbpm/src/main/resources/META-INF/jboss-esb.xml/?revision=18315&r1=18315&r2=18314):


              <jms-jca-provider name="CallbackQueue-JMS-Provider" connection-factory="ConnectionFactory">
              <jms-bus busid="jBPMCallbackBus">
              <jms-message-filter dest-type="QUEUE" dest-name="queue/CallbackQueue"/>
              </jms-bus>
              </jms-jca-provider>


              Would be this the most basic example to jms-jca-provider?

              • 4. Re: Configuration for jms-jca-provider
                beve

                Hi,

                yep, you are correct that the required attributes are "name" and "connection-factory".

                Regards,

                Daniel

                • 5. Re: Configuration for jms-jca-provider
                  lafbarbosa

                  Fine Daniel,

                  Thanks!

                  And, please, what about the other .XML files? In which cases must we use them?

                  Regards,

                  Luiz

                  • 6. Re: Configuration for jms-jca-provider
                    beve

                     

                    And, please, what about the other .XML files? In which cases must we use them?

                    Do you mean which are the required .xml files for a single esb archive?

                    Regards,

                    Daniel

                    • 7. Re: Configuration for jms-jca-provider
                      lafbarbosa

                      Not required. It seems that only jboss-esb.xml is required, right?

                      I mean the other one. What can they do and what for they are used?

                      Regards,

                      Luiz

                      • 8. Re: Configuration for jms-jca-provider
                        beve

                        Yeah, jboss-esb.xml is the only required file.
                        But if you have a JMS destination that is needed by your service you would need a definition of the JMS destination.
                        You would also want to declare a dependency for it in deployment.xml.
                        Same thing goes if your service depends on another service.

                        Regards,

                        Daniel

                        • 9. Re: Configuration for jms-jca-provider
                          lafbarbosa

                          Fine Daniel! Thanks!

                          Now, talking about the tags of tags, we can change all of them by <*-message-filter>, right?

                          In other words, instead of using tags into tags, I can substitute the first one by <*-message-filter>, where * is the specific type, like jms, sql, ftp.

                          In this way, I can determine which atributes are required or not; what is not possible with into because the values to the "name" attribute can be anything, isn't it?

                          Thanks in advance!

                          Regards,

                          Luiz

                          • 10. Re: Configuration for jms-jca-provider
                            lafbarbosa

                            Hi Daniel,

                            Please, I just would like to know which of the quickstart samples has the following kind of services:
                            - POJO
                            - WS
                            - EJB

                            Independently of the provider, you know which of them have these kind of services?

                            It seems that the kind of service doesn't matter, but I only would like to know if the jboss-esb.xml presents differences related it.

                            Thanks in advance!

                            Regards,

                            Luiz

                            • 11. Re: Configuration for jms-jca-provider
                              beve

                              Hi Luiz,

                              the following quickstart might help:
                              - POJO - custom_action quickstart
                              - WS - webservice_* quickstarts
                              - EJB - There is no quickstart that demos this (as far as I know that is)

                              Hope this help.

                              Regards,

                              Daniel

                              • 12. Re: Configuration for jms-jca-provider
                                lafbarbosa

                                Hi Daniel,

                                Thanks!

                                I posted now another one topic: Service Registry and service tag in jboss-esb.xml

                                Do you know something about what I ask there?

                                Regards,

                                Luiz