4 Replies Latest reply on Jan 24, 2006 3:54 AM by imcshane

    RA configuration question - config-properties

    imcshane

      Hi,

      I'm using JBoss 4.0.2 and have implemented a working JCA 1.5 resource adapter.

      Is there any way in JBoss to set the config-properties for an RA externally to the rar or ear archive.

      I know this can be done using a '-ds.xml' file for the ManagedConnectionFactory but I want other users of my RA to be able to change the configuration properties for the <resourceadapter-class> without having to extract and update the ra.xml file. Is this possible ?

      Thanks,
      Ivan

        • 1. Re: RA configuration question - config-properties

          The <resourceadapter-class> is part of the resource adapter core definition. This type of elements are not configurable externally. You can only configure externally details about the different connection factories and pools via '*ds.xml' file. You should be able to find more information in the JCA specification as the contents and rules for ra.xml (where <resourceadapter-class> is defined) are defined there.

          Hope this helps :-D

          • 2. Re: RA configuration question - config-properties
            imcshane

            Thanks for the reply Galder. Does that mean there is no way to externally configure the RA JavaBean in JBoss ?

            I have re-read the relevant portions of the spec and I believe that what I wish to do is a valid use of an RA.

            In section 5.3.7.1 of the spec where ResourceAdapter JavaBean configuration is covered it states


            "The ResourceAdapter deployer may further override the values of the ResourceAdapter instance before deployment".

            In the same section it also repeatedly refers to configuration of the RA JavaBean as a separate step from connection factory and activation spec configuration. It is my understanding that the RA JavaBean should contain the common configuration, the ManagedConnectionFactory beans contain the outbound specific config and the ActivationSpec beans contain the inbound specific config.

            It also describes in section 5.3.1 how as part of the bootstrapping mechanism the application server calls start() on a configured ResourceAdapter JavaBean. In the start method the RA may set up network endpoints based on this config.

            So unless I'm mistaken the ResourceAdapter bean is a deployment time configurable component according to the specification. If the only way this can be performed in JBoss is to edit the ra.xml file before packaging my rar I will need to look at alternatives as this won't be acceptable to my users e.g. doing all configuration in the *-ds.xml files.

            Thanks,
            Ivan

            • 3. Re: RA configuration question - config-properties

              Have you tried using exploded deployments by any chance? http://jboss.org/wiki/Wiki.jsp?page=ExplodedDeployment

              I think you might be able to do a similar thing for RAR files but I'm not 100% sure.

              • 4. Re: RA configuration question - config-properties
                imcshane

                Thanks again Galder. The exploded rar seems to deploy fine so that should do the trick.

                Ivan