User: tobyallsopp
Date: 01/07/25 02:52:41
Modified: src/main/org/jboss/deployment DeployerMBeanSupport.java
Log:
Patch #444219 from David Jencks ([EMAIL PROTECTED]). Adds
support for the addition of connection factory loaders after their
resource adapters have been deployed.
Revision Changes Path
1.3 +31 -3 jboss/src/main/org/jboss/deployment/DeployerMBeanSupport.java
Index: DeployerMBeanSupport.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/deployment/DeployerMBeanSupport.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DeployerMBeanSupport.java 2001/06/18 20:01:21 1.2
+++ DeployerMBeanSupport.java 2001/07/25 09:52:41 1.3
@@ -16,10 +16,16 @@
import org.jboss.util.ServiceMBeanSupport;
/**
- * <description>
+ * An abstract base class for deployer service implementations.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Toby Allsopp</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
+ *
+ * <p><b>Revisions:</b>
+ *
+ * <p><b>20010725 Toby Allsopp (patch from David Jencks)</b>
+ * <ul><li>Added <code>getDeployments</code> method so that subclasses
+ * can find out what has been deployed.</li></ul>
*/
public abstract class DeployerMBeanSupport
extends ServiceMBeanSupport
@@ -128,7 +134,10 @@
*/
protected Object getInfo(URL url)
{
- return deployments.get(url);
+ synchronized (deployments)
+ {
+ return deployments.get(url);
+ }
}
/**
@@ -152,6 +161,25 @@
*/
protected abstract void undeploy(URL url, Object info)
throws IOException, DeploymentException;
+
+ /**
+ * Returns the deployments that have been deployed by this
+ * deployer. The <code>Map</code> returned from this method is a
+ * snapshot of the deployments at the time the method is called and
+ * will not reflect any subsequent deployments or undeployments.
+ *
+ * @return a mapping from <code>URL</code> to
+ * <code>DeploymentInfo</code>
+ */
+ protected Map getDeployments()
+ {
+ Map ret = new HashMap();
+ synchronized (deployments)
+ {
+ ret.putAll(deployments);
+ }
+ return ret;
+ }
// Private -------------------------------------------------------
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development