[
https://issues.jboss.org/browse/AS7-3695?page=com.atlassian.jira.plugin.s...
]
Richard Achmatowicz edited comment on AS7-3695 at 2/9/12 6:39 PM:
------------------------------------------------------------------
There was another problem here: if you create a cache container, create a cache inside of
it and then remove the container, even with the above fix, the services for the child
caches get stopped but they do not get removed from the ServiceRegistry. Consulted with
Brian and he confirmed that this is the case: child services of a removed service will get
stopped but not removed when the parent is removed. Starting the same cache container
again causes the left over cache services to start up again as well, which is puzzling.
So, I have added in a step at the beginning of the code segment above to remove any
existing cache services left in the container before removing the container itself:
{noformat}
List<ServiceName> serviceNames = context.getServiceRegistry(false).getServiceNames()
;
for (ServiceName serviceName : serviceNames) {
if
(serviceName.toString().startsWith(EmbeddedCacheManagerService.getServiceName(name).toString()))
{
context.removeService(serviceName) ;
}
}
{noformat}
was (Author: rachmato):
There was another problem here: if you create a cache container, create a cache inside
of it and then delete the container, even with the above fix, the services for the cache
containers get stopped but they do not get removed from the ServiceRegistry. Consulted
with Brian and he confirmed that this is the case: child resources of a removed resource
will get stopped but not removed when the parent is removed. Starting the same cache
container again causes the left over cache services to start up again as well.
So, I have added in a step at the beginning of the code segment above to remove any
existing cache services left in the container before removing the container itself:
{noformat}
List<ServiceName> serviceNames = context.getServiceRegistry(false).getServiceNames()
;
for (ServiceName serviceName : serviceNames) {
if
(serviceName.toString().startsWith(EmbeddedCacheManagerService.getServiceName(name).toString()))
{
context.removeService(serviceName) ;
}
}
{noformat}
Management: infinispan cache-container remove operation does not
really remove container
----------------------------------------------------------------------------------------
Key: AS7-3695
URL:
https://issues.jboss.org/browse/AS7-3695
Project: Application Server 7
Issue Type: Bug
Components: Clustering, Domain Management
Affects Versions: 7.1.0.Final
Reporter: Dominik Pospisil
Assignee: Richard Achmatowicz
Labels: eap6_prd_req
Management: infinispan cache-container remove operation does not really remove container.
Subsequent add operation fails.
Steps to reproduce:
[standalone@localhost:9999 subsystem=infinispan]
./cache-container=test2:add(start="EAGER")
{"outcome" => "success"}
[standalone@localhost:9999 subsystem=infinispan] ./cache-container=test2:remove
{"outcome" => "success"}
[standalone@localhost:9999 subsystem=infinispan]
./cache-container=test2:add(start="EAGER")
{
"outcome" => "failed",
"failure-description" => "JBAS014749: Operation handler failed:
Service jboss.naming.context.java.jboss.infinispan.container.test2 is already
registered",
"rolled-back" => true
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira