User: d_jencks
Date: 02/04/13 09:10:11
Modified: src/main/org/jboss/metadata BeanMetaData.java
ConfigurationMetaData.java
Log:
Added ability to declare mbean dependencies from ejbs and container configurations
Revision Changes Path
1.38 +26 -7 jboss/src/main/org/jboss/metadata/BeanMetaData.java
Index: BeanMetaData.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/BeanMetaData.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- BeanMetaData.java 10 Apr 2002 05:44:45 -0000 1.37
+++ BeanMetaData.java 13 Apr 2002 16:10:11 -0000 1.38
@@ -7,20 +7,22 @@
package org.jboss.metadata;
-import java.util.Iterator;
+
+
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
import java.util.Set;
-import java.util.Collection;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
import org.jboss.deployment.DeploymentException;
import org.jboss.security.AnybodyPrincipal;
import org.jboss.security.NobodyPrincipal;
import org.jboss.security.SimplePrincipal;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.jboss.util.jmx.ObjectNameFactory;
/**
* A common meta data class for the entity, message-driven and session beans.
@@ -31,7 +33,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>.
* @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Bill Burke</a>
- * @version $Revision: 1.37 $
+ * @version $Revision: 1.38 $
*
* <p><b>Revisions:</b><br>
* <p><b>2001/10/16: billb</b>
@@ -129,6 +131,8 @@
private String securityProxy;
protected boolean clustered = false;
+
+ private Collection depends = new LinkedList();
// Static --------------------------------------------------------
@@ -290,6 +294,12 @@
return result;
}
+ public Collection getDepends()
+ {
+ Collection allDepends = new LinkedList(depends);
+ allDepends.addAll(getContainerConfiguration().getDepends());
+ return allDepends;
+ }
/**
* Checks meta data to obtain the Method Attributes of a bean's method:
@@ -602,6 +612,15 @@
beanInvoker = DEFAULT_CLUSTERED_BEAN_INVOKER;
}
}
+
+ //Get depends object names
+ for (Iterator dependsElements = getChildrenByTagName(element, "depends");
dependsElements.hasNext();)
+ {
+ Element dependsElement = (Element)dependsElements.next();
+ String dependsName = getElementContent(dependsElement);
+ depends.add(ObjectNameFactory.create(dependsName));
+ } // end of for ()
+
}
// Package protected ---------------------------------------------
1.26 +23 -5 jboss/src/main/org/jboss/metadata/ConfigurationMetaData.java
Index: ConfigurationMetaData.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/metadata/ConfigurationMetaData.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- ConfigurationMetaData.java 11 Mar 2002 01:29:07 -0000 1.25
+++ ConfigurationMetaData.java 13 Apr 2002 16:10:11 -0000 1.26
@@ -6,18 +6,21 @@
*/
package org.jboss.metadata;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.jboss.deployment.DeploymentException;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedList;
+import org.jboss.deployment.DeploymentException;
+import org.jboss.util.jmx.ObjectNameFactory;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
/** The configuration information for an EJB container.
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a>
- * @version $Revision: 1.25 $
+ * @version $Revision: 1.26 $
*
* <p><b>Revisions:</b><br>
* <p><b>2001/08/02: marcf</b>
@@ -99,6 +102,7 @@
private Element containerInterceptorsConf;
private Element clientInterceptors;
private HashMap clientInterceptorConfs = new HashMap();
+ private Collection depends = new LinkedList();
// Static --------------------------------------------------------
@@ -147,6 +151,11 @@
public boolean getReadOnlyGetMethods() { return readOnlyGetMethods; }
+ public Collection getDepends()
+ {
+ return depends;
+ }
+
public void importJbossXml(Element element) throws DeploymentException {
// everything is optional to allow jboss.xml to modify part of a configuration
@@ -243,6 +252,15 @@
// configuration for instance cache
containerCacheConf = getOptionalChild(element, "container-cache-conf",
containerCacheConf);
+
+ //Get depends object names
+ for (Iterator dependsElements = getChildrenByTagName(element, "depends");
dependsElements.hasNext();)
+ {
+ Element dependsElement = (Element)dependsElements.next();
+ String dependsName = getElementContent(dependsElement);
+ depends.add(ObjectNameFactory.create(dependsName));
+ } // end of for ()
+
// DEPRECATED: Remove this in JBoss 4.0
if
(containerInvoker.equals("org.jboss.ejb.plugins.jrmp12.server.JRMPContainerInvoker") ||
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development