[
https://issues.jboss.org/browse/AS7-3695?page=com.atlassian.jira.plugin.s...
]
Richard Achmatowicz commented on AS7-3695:
------------------------------------------
The remove operation was only removing one of three services started by the add operation:
DefaultEmbeddedCacheManagerService, BinderService, ChannelService.
Updated remove to remove all three services:
{noformat}
context.removeService(EmbeddedCacheManagerService.getServiceName(name));
String jndiName = (model.hasDefined(ModelKeys.JNDI_NAME) ?
InfinispanJndiName.toJndiName(model.get(ModelKeys.JNDI_NAME).asString()) :
InfinispanJndiName.defaultCacheContainerJndiName(name)).getAbsoluteName();
ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(jndiName);
context.removeService(bindInfo.getBinderServiceName()) ;
// check if a channel was installed
ServiceName channelServiceName = ChannelService.getServiceName(name) ;
ServiceController<?> channelServiceController =
context.getServiceRegistry(false).getService(channelServiceName);
if (channelServiceController != null) {
context.removeService(channelServiceName);
}
{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