User: d_jencks
Date: 01/11/18 22:58:57
Modified: src/main/org/jboss/system ServiceConfigurator.java
ServiceController.java ServiceCreator.java
Log:
Cleaned up deployment a bit and enabled jar in sar
Revision Changes Path
1.8 +8 -10 jboss/src/main/org/jboss/system/ServiceConfigurator.java
Index: ServiceConfigurator.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/system/ServiceConfigurator.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ServiceConfigurator.java 2001/11/15 06:30:22 1.7
+++ ServiceConfigurator.java 2001/11/19 06:58:57 1.8
@@ -42,7 +42,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Hiram Chirino</a>
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*
* <p><b>20010830 marc fleury:</b>
* <ul>
@@ -180,21 +180,20 @@
// The MBean is no longer available
// It's ok, just return It is ????? Why?? Oh yeah?
throw new DeploymentException("trying to configure nonexistent mbean: " +
objectName);
- //log.debug("object name " + objectName + " is no longer available");
- //return true;
}
// Set attributes
+ MBeanAttributeInfo[] attributes = info.getAttributes();
NodeList attrs = mbeanElement.getElementsByTagName("attribute");
for (int j = 0; j < attrs.getLength(); j++) {
Element attributeElement = (Element)attrs.item(j);
String attributeName = attributeElement.getAttribute("name");
+ attrfound:
if (attributeElement.hasChildNodes()) {
// Get the attribute value
String attributeValue =
((Text)attributeElement.getFirstChild()).getData().trim();
- MBeanAttributeInfo[] attributes = info.getAttributes();
for (int k = 0; k < attributes.length; k++) {
if (attributeName.equals(attributes[k].getName())) {
String typeName = attributes[k].getType();
@@ -230,10 +229,11 @@
log.debug(attributeName + " set to " + attributeValue + " in " +
objectName);
server.setAttribute(objectName, new Attribute(attributeName,
value));
- break;
- }
- }
- }
+ break attrfound;
+ }//if name matches
+ }//for attr names
+ throw new DeploymentException("No Attribute found with name: " +
attributeName);
+ }//if has children
}
// Set mbean references (object names)
ArrayList mBeanRefs = new ArrayList();
@@ -262,7 +262,6 @@
else
{
log.debug("considering " + mBeanRefName + " with object name " +
mBeanRefObjectName);
- MBeanAttributeInfo[] attributes = info.getAttributes();
for (int k = 0; k < attributes.length; k++) {
if (mBeanRefName.equals(attributes[k].getName())) {
String typeName = attributes[k].getType();
@@ -320,7 +319,6 @@
} // end of if ()
else
{
- MBeanAttributeInfo[] attributes = info.getAttributes();
for (int k = 0; k < attributes.length; k++) {
if (mBeanRefListName.equals(attributes[k].getName())) {
log.debug(mBeanRefListName + " set to " + mBeanRefListNames + "
in " + objectName);
1.13 +3 -2 jboss/src/main/org/jboss/system/ServiceController.java
Index: ServiceController.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/system/ServiceController.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ServiceController.java 2001/11/12 06:52:17 1.12
+++ ServiceController.java 2001/11/19 06:58:57 1.13
@@ -42,7 +42,7 @@
* @see org.jboss.system.Service
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a>
- * @version $Revision: 1.12 $ <p>
+ * @version $Revision: 1.13 $ <p>
*
* <b>Revisions:</b> <p>
*
@@ -247,9 +247,10 @@
} // end of if (mBeanRefs.size() > 0)
}
- catch (ConfigurationException e)
+ catch (Exception e)
{
log.error("Could not configure MBean: " + objectName, e);
+ server.unregisterMBean(objectName);
throw e;
}
String serviceFactory = mbeanElement.getAttribute("serviceFactory");
1.3 +7 -3 jboss/src/main/org/jboss/system/ServiceCreator.java
Index: ServiceCreator.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/system/ServiceCreator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServiceCreator.java 2001/09/08 00:53:57 1.2
+++ ServiceCreator.java 2001/11/19 06:58:57 1.3
@@ -13,6 +13,8 @@
import javax.management.ObjectInstance;
import javax.management.MalformedObjectNameException;
+import org.jboss.logging.Logger;
+
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -22,7 +24,7 @@
* @see Service
*
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*
* <p><b>Revisions:</b>
* <p><b>2001/08/03 marcf </b>
@@ -33,6 +35,8 @@
public class ServiceCreator
{
// Attributes ----------------------------------------------------
+
+ private final Logger log = Logger.create(getClass());
private MBeanServer server;
@@ -75,7 +79,7 @@
// get the constructor params/sig to use
ConstructorInfo constructor =
ConstructorInfo.create(mbeanElement);
- System.out.println("About to create the bean"+name);
+ log.info("About to create the bean"+name);
// Create the MBean instance
ObjectInstance instance =
@@ -85,7 +89,7 @@
constructor.params,
constructor.signature);
- System.out.println("Created the bean"+name);
+ log.info("Created the bean"+name);
return instance;
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development