5 Replies Latest reply on Jan 12, 2012 11:02 AM by Ramesh Reddy

    Adding "resource-adapter" using CLI

    Ramesh Reddy Master

      Ok, the title is wrong, actually what I am looking for is adding a "connection-factory" to the "resource-adapter" using CLI.  One can add a "resource-adapter" using code like

       

      /subsystem=resource-adapters/resource-adapter=teiid-connector-ws.rar:add(archive=teiid-connector-ws.rar,transaction-support=NoTransactions)
      

       

      However, I am not sure how one can add a "connection-factories" to it. If anybody can show a sample I really appreciate it.

       

      I looked though the code, I did not find any operations that were registered at the connection factory "sub-model" level. There is only "add" operation at the "resource-adapter" level, nothing below it. In Teiid, we have many resource-adapters, and each resource-adaptor can have many different connection factories. Each connection factory lifecycle is independent of each other, such that I should be able to add/remove "connection-factory" under a "resource-adapter", without disturbing other connection factories.

       

      The current model is very limiting, that you can probably add *one* connection factory along with resource-adapter once I know how to use CLI command, if I had to add another connection factory, I need to delete the old resource-adapter and add a new one with two connection factories. I do not think that is good.

       

      To do this correctly, we would need to register each connection factory as "sub-model" under the "resource-adapter" model, and add  "add", "remove" operations, and move operations like "flush-idle-connection-in-pool" from resource-adapter level to the connection factory level.

       

      Please correct me if my suggestion is wrong, and how we can proceed to address this issue.

       

      Ramesh..