5 Replies Latest reply on Apr 1, 2009 5:08 AM by alesj

    New resource adapter deployers (JCA)

    jesper.pedersen

      I'm currently looking into implementing the new resource adapter deployers for JCA 1.6 (JBJCA-35).

      The chain must be able to handle the following

      1) ra.xml
      2) jboss-ra.xml
      3) JCA 1.6 annotated classes

      from within a .RAR archive.

      1) and 3) are specified by the JCA specification and 2) is our specific deployment descriptor.

      This means that we need something like

      1) RaXmlParsingDeployer (PARSE)
      2) JBossRaXmlParsingDeployer (PARSE)
      3) RaAnnotationScannerDeployer (POST_CLASSLOADER)
      4) RaMergeMetadataDeployer (PRE_REAL)
      5) RaDeployer (REAL)

      1) and 2) - the metadata is defined in the JBMETA project.
      3) - is done if ra.xml::metadata-complete == false.
      4) - merges the metadata between the previous three deployers as we must make sure to override information from 3)
      5) - creates the BeanMetaData

      One question is if I need a second deployer in the PRE_REAL stage that adds the dependencies to other deployment units as defined in jboss-ra.xml
      if we create annotations for describing the dependencies - e.g. RaDependencyDeployer. Otherwise this could go in the DESCRIBE phase.

      If this sounds correct - what are the best class to extend from in each deployer (AbstractVFSParsingDeployer, AbstractSimpleRealDeployer, ...) ? There are various different solutions to each of the stages.

      btw - is there any API documentation online that I could link my JavaDoc against ?

      Ideas, comments or flames welcomed :)

        • 1. Re: New resource adapter deployers (JCA)
          alesj

           

          "jesper.pedersen" wrote:

          3) - is done if ra.xml::metadata-complete == false.

          This should just plug-in into AnnotationEnvironment.
          See
          (Filtered)AnnotationEnvironmentDeployer in JBossAS's metadata-deployer-jboss-beans.xml.

          "jesper.pedersen" wrote:

          One question is if I need a second deployer in the PRE_REAL stage that adds the dependencies to other deployment units as defined in jboss-ra.xml
          if we create annotations for describing the dependencies - e.g. RaDependencyDeployer. Otherwise this could go in the DESCRIBE phase.

          I don't understand what you're trying to do here.

          "jesper.pedersen" wrote:

          what are the best class to extend from in each deployer (AbstractVFSParsingDeployer, AbstractSimpleRealDeployer, ...) ? There are various different solutions to each of the stages.

          It depends. :-)
          Go to deployers project and check the existing Deployer sub-classes hierarchy.
          Most of them have meaningful names and there's a lot of examples/tests behind them.

          "jesper.pedersen" wrote:

          btw - is there any API documentation online that I could link my JavaDoc against ?

          Unfortunately not.
          I'm currently trying to get at least the separate MC downloads up on the open.


          • 2. Re: New resource adapter deployers (JCA)
            jesper.pedersen

             

            This should just plug-in into AnnotationEnvironment.
            See
            (Filtered)AnnotationEnvironmentDeployer in JBossAS's metadata-deployer-jboss-beans.xml.

            Do you have an example somewhere ? I'm not running in the AS -- this is for the standalone JCA container directly on the MC.

            I don't understand what you're trying to do here.


            I need somewhere to add one or more dependencies on beans already in the INSTALLED stage. The dependencies are listed in our jboss-ra.xml file. Best practices for that ?

            It depends. :-)
            Go to deployers project and check the existing Deployer sub-classes hierarchy.
            Most of them have meaningful names and there's a lot of examples/tests behind them.


            package.html files would be nice to get an overview... but I'm reading through the -spi directories currently - and with AnnotationEnvironmentDeployer I guess deployers-vfs also.

            • 3. Re: New resource adapter deployers (JCA)
              alesj

               

              "jesper.pedersen" wrote:

              Do you have an example somewhere ? I'm not running in the AS -- this is for the standalone JCA container directly on the MC.

              See the tests associated with AnnotationEnvironment.

              "jesper.pedersen" wrote:

              I need somewhere to add one or more dependencies on beans already in the INSTALLED stage. The dependencies are listed in our jboss-ra.xml file. Best practices for that ?

              JBP has similar issues:
              - http://www.jboss.com/index.html?module=bb&op=viewtopic&t=146744

              • 4. Re: New resource adapter deployers (JCA)
                jesper.pedersen

                Ok, back working on this again.

                The question is how to best implement test cases for the deployer chain.

                In the end the project should boot in standalone mode with a deploy/ directory where the .rar files are located. So defining a bootstrap.xml file should be first on the list.

                Is the bootstrap.xml file in deployers-vfs the best to copy from ?

                The project currently uses the EJB3's EmbeddedTestMcBootstrap class to do unit testing.

                Pointers on the best way to proceed would be great :)

                • 5. Re: New resource adapter deployers (JCA)
                  alesj