[jboss-cvs] JBossAS SVN: r86843 - branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Apr 6 05:27:36 EDT 2009
Author: emuckenhuber
Date: 2009-04-06 05:27:35 -0400 (Mon, 06 Apr 2009)
New Revision: 86843
Modified:
branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
Log:
cleanup the properties and operation references.
Modified: branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2009-04-06 09:25:23 UTC (rev 86842)
+++ branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2009-04-06 09:27:35 UTC (rev 86843)
@@ -158,6 +158,8 @@
private MetaValueFactory metaValueFactory = MetaValueFactory.getInstance();
/** ManagedObjectFactory used for platform mbean ManagedObjects */
ManagedObjectFactory managedObjFactory = ManagedObjectFactory.getInstance();
+ /** The created remoting targets. */
+ private List<String> remotingTargets = new ArrayList<String>();
public ManagementViewImpl() throws IOException
{
@@ -177,6 +179,17 @@
stateMappings.put("Installed", RunState.RUNNING.name());
}
+ public void start()
+ {
+ // Nothing
+ }
+
+ public void stop()
+ {
+ // Cleanup on stop
+ release();
+ }
+
public boolean load()
{
// If the profile is not modified do nothing
@@ -301,6 +314,13 @@
this.unresolvedRefs.clear();
this.lastModified.clear();
this.rootDeployments.clear();
+
+ // Unregister targets
+ for(String target : remotingTargets)
+ Dispatcher.singleton.unregisterTarget(target);
+
+ log.debug("Unregistered " + remotingTargets.size() + " targets.");
+ this.remotingTargets.clear();
}
protected void loadProfiles(boolean trace)
@@ -1026,7 +1046,6 @@
{
mainDeployer.process();
mainDeployer.checkComplete();
- this.forceReload = true;
}
/**
@@ -1353,6 +1372,7 @@
Dispatcher.singleton.registerTarget(dispatchName, delegate);
ManagedProperty proxy = (ManagedProperty) Remoting.createRemoteProxy(dispatchName,
loader, ifaces, locator, interceptors, "ProfileService");
+ remotingTargets.add(dispatchName);
return proxy;
}
@@ -1396,6 +1416,7 @@
Dispatcher.singleton.registerTarget(dispatchName, new ManagedOperationDelegate(op, componentName));
ManagedOperation opProxy = (ManagedOperation) Remoting.createRemoteProxy(dispatchName,
loader, ifaces, locator, interceptors, "ProfileService");
+ remotingTargets.add(dispatchName);
opProxies.add(opProxy);
}
return opProxies;
More information about the jboss-cvs-commits
mailing list