5 Replies Latest reply on Nov 24, 2010 10:25 AM by jesper.pedersen

    ResourceAdapter.start

    traffic

      I was doing some testing with ironjacamar-1.0.0.Beta3 and I noticed that ResourceAdapter.start is called after a ManagedConnectionFactory instance is configured and after the called to ManagedConnectionFactory.setResourceAdapter.
      Shouldn't ResourceAdapter.start be called before an MCF is configured (at least before setResourceAdapter is called)?  In the Connector Architecture specification it states that the start method should be called before any other object belonging to the resource adapter is used.  This is from section 5.3.5
      The application server must call the start method on the ResourceAdapter JavaBean (in order to create a functional resource adapter instance), before accessing other methods on the ResourceAdapter JavaBean instance or before using other objects that belong to the same resource adapter instance.

      I was doing some testing with ironjacamar-1.0.0.Beta3 and I noticed that ResourceAdapter.start is called after a ManagedConnectionFactory instance is configured and after the called to ManagedConnectionFactory.setResourceAdapter.

       

      Shouldn't ResourceAdapter.start be called before an MCF is configured (at least before setResourceAdapter is called)?  In the connector architecture specification it states that the start method should be called before any other object belonging to the resource adapter is used.  This is from section 5.3.5:

       

      The application server must call the start method on the ResourceAdapter JavaBean (in order to create a functional resource adapter instance), before accessing other methods on the ResourceAdapter JavaBean instance or before using other objects that belong to the same resource adapter instance.

        • 1. Re: ResourceAdapter.start
          jesper.pedersen

          Look at figure 5-4. The start() method is called after the resource adapter has been configured and deployed in the application server.

           

          I agree that reading the text in isolation gives a different view.

           

          HTH

          • 2. Re: ResourceAdapter.start
            traffic

            My take on figure 5.4 is as follows:
            1)An individual (the resource adapter deployer) configures the ra.xml deployment descriptor.
            2) The individual deploys the configured resource adapter in the application server.  The deployment can be done using a deployment tool or by some other means supported by the application server.
            3) The application server bootstraps the configured resource adapter.  Section 5.3.1 defines bootstrapping as follows:
            In order to bootstrap a resource adapter instance, the application server must
            use the configured ResourceAdapter JavaBean and call its start method. The
            start method call is a startup notification from the application server, and this
            method is called by an application server thread.
            But I can be wrong about this – it's happened before.

            My take on figure 5.4 is as follows:

             

            1) An individual (the resource adapter deployer) configures the ra.xml deployment descriptor.

             

            2) The individual deploys the configured resource adapter in the application server.  The deployment can be done using a deployment tool or by some other means supported by the application server.

             

            3) The application server bootstraps the configured resource adapter.  Section 5.3.1 defines bootstrapping as follows:

             

            In order to bootstrap a resource adapter instance, the application server must

            use the configured ResourceAdapter JavaBean and call its start method. The

            start method call is a startup notification from the application server, and this

            method is called by an application server thread.

             

             

            But I can be wrong about this – it's happened before.

            Thanks for your help.

            • 3. Re: ResourceAdapter.start
              jesper.pedersen

              1) An individual (the resource adapter deployer) configures the ra.xml deployment descriptor.

              Metadata is read from ra.xml or the annotations - instances of the classes are created and the values injected.

               

              2) The individual deploys the configured resource adapter in the  application server.  The deployment can be done using a deployment tool  or by some other means supported by the application server.

              The connection factories and admin objects are bound in JNDI.

               

              3) The application server bootstraps the configured resource adapter.  Section 5.3.1 defines bootstrapping as follows:

              The container calls the start() method after which the resource adapter is ready to serve requests.

               

              HTH

              • 4. Re: ResourceAdapter.start
                traffic

                So this will be new behavior for JBoss application server 6 – JBoss 4 and 5 call start followed by the setResourceAdapter calls on the MCF and ActivationSpec?  ironjacamar-1.0.0.Beta3 (or a subsequent beta) will become part of JBoss AS 6 or will only a standalone container be supported for version 1.6 of the connector architecture?
                This has never been an issue with any application server – I admit I've never tried Geronimo, but WebLogic, GlassFish, WebSphere, and the Oracle Application Server call start followed by the setResourceAdapter calls.  Just getting started with the WebSphere 8 beta, so maybe it too performs as ironjacamar.

                So this will be new behavior for JBoss application server 6 – JBoss 4 and 5 call start() followed by the setResourceAdapter calls on the MCF and ActivationSpec?  ironjacamar-1.0.0.Beta3 (or a subsequent beta) will become part of JBoss AS 6 or will only a standalone container be supported for version 1.6 of the connector architecture?

                 

                This has never been an issue with any application server – I admit I've never tried Geronimo, but WebLogic, GlassFish, WebSphere, and the Oracle Application Server call start followed by the setResourceAdapter calls.  Just getting started with the WebSphere 8 beta, so maybe it too performs as ironjacamar.

                Again thanks for your time.

                • 5. Re: ResourceAdapter.start
                  jesper.pedersen

                  ironjacamar-1.0.0.Beta3 (or a subsequent beta) will become part of  JBoss AS 6 or will only a standalone container be supported for version  1.6 of the connector architecture?

                  AS 7 -- http://www.jboss.org/jbossas/downloads

                  This has never been an issue with any application server

                  The spec states (5.3.2):


                  "Prior to using a ManagedConnectionFactory JavaBean, the application server
                  must create an association between the ManagedConnectionFactory JavaBean and
                  a ResourceAdapter JavaBean, by calling the setResourceAdapter method on
                  the ManagedConnectionFactory JavaBean. A successful association is established
                  only when the setResourceAdapter method on the
                  ManagedConnectionFactory JavaBean returns without throwing an exception."

                  and (5.3.3):

                   

                  "Prior to using an ActivationSpec JavaBean, the application server must create an
                  association between the ActivationSpec JavaBean and a ResourceAdapter
                  JavaBean, by calling the setResourceAdapter method on the ActivationSpec
                  JavaBean. A successful association is established only when the
                  setResourceAdapter method on the ActivationSpec JavaBean returns without
                  throwing an exception."

                  Since the start() method may interact with these components the association have to happen before calling the method. IronJacamar is more strict towards the spec than our earlier implementations -- just take a look at the validator chain which will fail resource adapters that doesn't comply to the spec.

                   

                  As to the other vendors - you will have to discuss this issue with them.