5 Replies Latest reply on Oct 25, 2012 3:36 PM by van.halbert

    Deployed resource-adapter using jboss-as:add-resource is not available until server is restarted

    van.halbert

      I'm configuring a resource-adapter using the jboss maven plugin, but the resource isn't available until I restart the server, and then all is good. 

       

      I get the javax.naming.NameNotFoundException if I try to access the resource before restarting.

       

      I've been unable to find any issue outstanding on this. 

       

      Should I log a jira or is this a known issue?

        • 1. Re: Deployed resource-adapter using jboss-as:add-resource is not available until server is restarted
          van.halbert

          I'm using jboss-as 7.1.1 final for both server and plugin.

          • 2. Re: Deployed resource-adapter using jboss-as:add-resource is not available until server is restarted
            van.halbert

            Here's configured resource adapter:

             

                    <resource-adapters>
                        <resource-adapter>
                            <archive>
                                teiid-connector-infinispan.rar
                            </archive>
                            <transaction-support>NoTransaction</transaction-support>
                            <connection-definitions>
                                <connection-definition class-name="org.teiid.resource.adapter.infinispan.InfinispanManagedConnectionFactory" jndi-name="java:jboss/eis/teiid-infinispan" enabled="true" use-java-context="true" pool-name="infinispanCacheDS">
                                    <config-property name="CacheTypeMap">
                                        local-quickstart-cache:com.client.quickstart.pojo.Order
                                    </config-property>
                                    <config-property name="CacheJndiName">
                                        java:jboss/infinispan/container/teiid-infinispan-quickstart
                                    </config-property>
                                    <config-property name="module">
                                        com.client.quickstart.pojos
                                    </config-property>
                                </connection-definition>
                            </connection-definitions>
                        </resource-adapter>
                    </resource-adapters>
            • 3. Re: Deployed resource-adapter using jboss-as:add-resource is not available until server is restarted
              van.halbert

              The one message I do get when the server is restarted, but don't see when deployed, is:

               

              16:51:33,574 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010401: Bound JCA ConnectionFactory [java:jboss/eis/teiid-infinispan]

              • 4. Re: Deployed resource-adapter using jboss-as:add-resource is not available until server is restarted
                van.halbert

                Using CLI to configure a resource-adapter, you need to activate it, example (taken from another discussion):

                 

                /subsystem=resource-adapters/resource-adapter=controller.rar:activate

                 

                My guess is there's someway to activate the resource adapter via the maven plugin, but I've not found it yet.  I'll continue to search, but I hope someone else knows how.

                 

                Thanks.

                • 5. Re: Deployed resource-adapter using jboss-as:add-resource is not available until server is restarted
                  van.halbert

                  It appears something is wrong with the plugin when adding a resource adapter, cause when I do a datasource (add-resource), the activation is done, and you see the bound comment in the log:

                   

                  14:27:32,715 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) JBAS010400: Bound data source [java:/accounts-ds]