10 Replies Latest reply on Feb 10, 2012 7:40 AM by dimonv

    Connection config-properties are ignored

    dimonv

      Hi all,

       

      I have a problem with our resource adapter resp. it's deploymen in JBoss 7.1.0.CR1b: the <config-property> tags are ignored. In the source code I've seen that the part handling these properties is commented; class org.jboss.as.connector.subsystems.resourceadapters.RaOperationUtil

       

      ...

      public static ModifiableConnDef buildConnectionDefinitionObject(final OperationContext context, final ModelNode operation, final String poolName) throws OperationFailedException, ValidateException {

      Map<String, String> configProperties = new HashMap<String, String>(0);

      // if (operation.hasDefined(CONFIG_PROPERTIES.getName())) {

      //     configProperties = new HashMap<String, String>(operation.get(CONFIG_PROPERTIES.getName()).asList().size());

      //      for (ModelNode property : operation.get(CONFIG_PROPERTIES.getName()).asList()) {

      ....

      Other is documented on https://docs.jboss.org/author/display/AS7/Resource+adapters

       

      Could anybode explain why the connection properties no more supported?

       

      Thanks

        • 1. Re: Connection config-properties are ignored
          maeste

          They are supported as subresources. So for example you can add it with a command like this:

           

          /subsystem=resource-adapters/resource-adapter=archive.rar_2/config-properties=name:add(value=value)

           

           

          or read it:

           

          /subsystem=resource-adapters/resource-adapter=archive.rar_2/config-properties=name:read-resource

          {

              "outcome" => "success",

              "result" => {"value" => "value"}

          }

          Of course parser will take care of parse xml and create subresource.
          If you still have problem, please provide your configuration and detailed description of what you would expect and that you are not getting
          regards
          S.

          - AS7-2981 Provide consistent behaviour to enable/disable datasources and resource adapters
          - AS7-3316 stanalonde.xml, xa-datasource/security, <user-name> cannot be parametrised
          - AS7-3349 Data-source add allows adding data sources with non existing JDBC driver
          - AS7-3379 ResourceAdapterActivatorService never gets stopped
          - AS7-3385 "xa-datasource-properties" "Instance" property validation does not allow empty value
          - AS7-3477 If DataSourceDisable fails the stopped/removed services need bringing back to their original state
          - AS7-3560 ConnectionFactory not registered/bound for rar deployments inside an ear
          - AS7-3572 Changing a DS JNDI name leads to DS that cannot be enabled
          - AS7-3578 Errors in data source subsystem checking
          - AS7-3598 It's impossible to add and activate resource adapter after .rar deployment
          • 2. Re: Connection config-properties are ignored
            dimonv

            I didn't use jboss admin, I've configured them directly in standalone.xml the way described hier https://docs.jboss.org/author/display/AS7/Resource+adapters. And I can see them on the mgmt-console. But on bottstrap they are just ignored.

            Could you please send a snippet of your jboss configuration containing resource adapter?

             

            Thanks and regards

            • 3. Re: Connection config-properties are ignored
              dimonv

              I found out the origin of the issue. In my manuell resource adapter configuration I put the

              <config-property>
              into wrong scope:

              <resource-adapter>

                  <archive>my.rar</archive>

                  <config-property name="prop1">X</config-property>

                  <config-property name="prop2">Y</config-property>

                  <connection-definitions>

                      <connection-definition class-name="com.acme.ConnectionFactoryImpl"

                          jndi-name="java:/eis/ACMEConnector" pool-name="ACMEConnector">

                          <pool>

                              <min-pool-size>0</min-pool-size>

                              <max-pool-size>100</max-pool-size>

                          </pool>

                          <security>

                              <application />

                          </security>

                      </connection-definition>

                  </connection-definitions>

              thus on bootstrapping the config properties have been ignored. But this way is described https://docs.jboss.org/author/display/AS7/Resource+adapters, what's obviously wrong.

              After I moved them to the connection-definition, CF has been initialized properly.

               

              BUT now I get:

               

              java.lang.ClassNotFoundException: com.iona.corba.art.artimpl.ORBImpl from [Module "org.jboss.as.connector:main" from local module loader @19eda2c (roots: C:\eplatform\jboss\AS-7.1\modules)]

              com.iona.corba.art.artimpl.ORBImpl is used by my adapter and is actually in the RAR file I deployed to <JBoss AS 7>/standalone/deployments.

               

              Is my deployment wrong? How should I deploy the RAR?

               

              Thanks in advance.

              • 4. Re: Connection config-properties are ignored
                jesper.pedersen

                Start by running the RAR info tool - http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/tools.html#tools_rarinfo - from the IronJacamar 1.1 distribution.

                 

                And lets see a "jar tf" of the archive...

                • 5. Re: Connection config-properties are ignored
                  dimonv

                  Hi,

                   

                  sorry, but can I find it? I downloaded version 1.0.7.Final and there is no rar-info.sh in as/doc just as-upgrader.sh.

                  Do you probably mean validator/validator.sh? I tried it and got following in the log file:

                  Severity: ERROR

                  Section: 6.5.3.2

                  Description: A ManagedConnectionFactory must implement a "public int hashCode()" method.

                  Code: com.axatech.corba.resourceadapter.CorbaManagedConnectionFactoryImpl

                   

                  Severity: ERROR

                  Section: 6.5.3.2

                  Description: A ManagedConnectionFactory must implement a "public boolean equals(Object)" method.

                  Code: com.axatech.corba.resourceadapter.CorbaManagedConnectionFactoryImpl

                   

                  Severity: ERROR

                  Section: 19.4.2

                  Description: A ResourceAdapter must implement a "public int hashCode()" method.

                  Code: com.axatech.corba.resourceadapter.CorbaResourceAdapterImpl

                   

                  Severity: ERROR

                  Section: 19.4.2

                  Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.

                  Code: com.axatech.corba.resourceadapter.CorbaResourceAdapterImpl

                   

                  Then I fixed as advised and redeploy it but still the same: java.lang.ClassNotFoundException

                   

                  Regards

                  • 6. Re: Connection config-properties are ignored
                    dimonv

                    sorry, you meant 1.1.0 distribution. I tried it and got a report.txt with suggested resource-adapter config. I copied it into standalone.xml and it works. However the only difference in current config is

                    <archive>C:/eplatform/jboss/AS-7.1/standalone/deployments/jp-infra-corba-resourceadapter.rar</archive>
                    

                    Does that mean that I can put my rar anywhere on the file system and not only in deployments?

                    In my  original config I used:

                    <archive>jp-infra-corba-resourceadapter.rar</archive>
                    

                    as the name of deployed RAR.

                    Is RAR file deployable by putting into deployments directory?

                    • 7. Re: Connection config-properties are ignored
                      jesper.pedersen

                      No - its "<archive>jp-infra-corba-resourceadapter.rar</archive>" with the file in deployments/

                      • 8. Re: Connection config-properties are ignored
                        dimonv

                        Then could you please explain, why if I configure <archive> with absolut path of the RAR file it works; connection definition is deployed. But if I configure <archive> with RAR name only the third party classes are not found by module class loader "org.jboss.as.connector:main".

                        Is it a bug in IronJacamar's AS integration?

                        • 9. Re: Connection config-properties are ignored
                          dimonv

                          Sorry, my mistake: connection-definition deployment doesn't work with <archive>C:/eplatform/jboss/AS-7.1/standalone/deployments/jp-infra-corba-resourceadapter.rar</archive> at all.

                           

                          The reason I tried with this setting is report file generated by rar-info.bat; there was <archive>C:/eplatform/jboss/AS-7.1/standalone/deployments/jp-infra-corba-resourceadapter.rar</archive>

                          • 10. Re: Connection config-properties are ignored
                            dimonv

                            Hi Jesper,

                             

                            my RA still doesn't see the third party libraries packaged into rar.

                            I think it is a bug.