Hi,
since i had trouble in re-creating a resource adapter using a sequence of (:add, :remove, :add) operations in AS7.1.0.Final...
[standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=my-adapter.ear:add(archive=my-adapter.ear)
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=my-adapter.ear:remove
{"outcome" => "success"}
[standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=my-adapter.ear:add(archive=my-adapter.ear)
{
"outcome" => "failed",
"failure-description" => "JBAS014749: Operation handler failed: Service jboss.resourceadapters.ra.MyAdapter is already registered",
"rolled-back" => true
}
... i tried to execute a :reload after the :remove to workaround the problem. This seemed to work at first sight (the failure vanished) but after a few more :remove, :reload, :add cycles i ended up with duplicate resource adapters. Digging deeper i noticed that my resource adapter is renamed (a numeric increment is added) with each execution.
[standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=my-adapter.ear:add(archive=my-adapter.ear)
{"outcome" => "success"}
[standalone@localhost:9999 /] ls /subsystem=resource-adapters/resource-adapter
my-adapter.ear
[standalone@localhost:9999 /] :reload
{"outcome" => "success"}
[standalone@localhost:9999 /] ls /subsystem=resource-adapters/resource-adapter
my-adapter.ear->1
[standalone@localhost:9999 /] /subsystem=resource-adapters/resource-adapter=my-adapter.ear:add(archive=my-adapter.ear)
{"outcome" => "success"}
[standalone@localhost:9999 /] ls /subsystem=resource-adapters/resource-adapter
my-adapter.ear my-adapter.ear->1
Im wondering if this is an issue or intended behaviour since it prevents building reliable CLI scripts dealing with the re-creation of resource adapters.
Regards
Robert