-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.4RC1
-
None
The method ServiceController.register(ServiceContext ctx, Collection depends) throws Exception; can duplicate, triplicate or "n-plicate" ServiceProxy objects. This can happen when the deployment have many dependencys and register is called n-times.
a solution may be.:
/**
- Register the service context and its dependencies against the microkernel.
- If the context is already registered it does nothing.
*/
private void register(ServiceContext ctx, Collection depends) throws Exception
{
boolean registered = installedServices.contains(ctx);
if ((registered) && (ctx.proxy != null))
{ //dont duplicate ServiceProxy objname return; } else if (!registered) {
installedServices.add(ctx);
if (depends != null)
{
log.debug("adding depends in ServiceController.register: " + depends);
for (Iterator i = depends.iterator(); i.hasNext()
}
}
// Get the fancy service proxy (for the lifecycle API)
ctx.proxy = getServiceProxy(ctx.objectName, null);
}