[jboss-cvs] JBossAS SVN: r65045 - in trunk/server: src/main/org/jboss/ejb/deployers and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 4 11:21:29 EDT 2007


Author: adrian at jboss.org
Date: 2007-09-04 11:21:29 -0400 (Tue, 04 Sep 2007)
New Revision: 65045

Added:
   trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployerMBean.java
Modified:
   trunk/server/.classpath
   trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java
Log:
JBAS-4666 - Register the EjbDeployer as an MBean and the webservice should be optional

Modified: trunk/server/.classpath
===================================================================
--- trunk/server/.classpath	2007-09-04 14:38:03 UTC (rev 65044)
+++ trunk/server/.classpath	2007-09-04 15:21:29 UTC (rev 65045)
@@ -44,6 +44,7 @@
 	<classpathentry kind="lib" path="/thirdparty/jboss/integration/lib/jboss-integration.jar" sourcepath="/thirdparty/jboss/integration/lib/jboss-integration-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jboss-security-spi/lib/jboss-security-spi.jar" sourcepath="/thirdparty/jboss/jboss-security-spi/lib/jboss-security-spi-sources.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/jbosssx/lib/jbosssx.jar" sourcepath="/thirdparty/jboss/security/lib/jbosssx-sources.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-aop-mc-int.jar" sourcepath="/thirdparty/jboss/microcontainer/lib/jboss-aop-mc-int-sources.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/main"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java	2007-09-04 14:38:03 UTC (rev 65044)
+++ trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployer.java	2007-09-04 15:21:29 UTC (rev 65045)
@@ -30,6 +30,7 @@
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
@@ -52,7 +53,8 @@
  * @author adrian at jboss.org
  * @version $Revision$
  */
-public class EjbDeployer extends AbstractSimpleVFSRealDeployer<ApplicationMetaData>
+ at JMX(name="jboss.ejb:service=EJBDeployer", exposedInterface=EjbDeployerMBean.class)
+public class EjbDeployer extends AbstractSimpleVFSRealDeployer<ApplicationMetaData> implements EjbDeployerMBean
 {
    /** */
    private String transactionManagerServiceName;
@@ -193,12 +195,16 @@
       attr.setValue(dependencyValue);
       attrs.add(attr);
       // Add injection of the WebServiceName
-      ServiceAttributeMetaData ws = new ServiceAttributeMetaData();
-      ws.setName("WebServiceName");
-      ServiceDependencyValueMetaData wsDepends = new ServiceDependencyValueMetaData();
-      wsDepends.setDependency(getWebServiceName());
-      ws.setValue(wsDepends);
-      attrs.add(ws);
+      String wsName = getWebServiceName();
+      if (wsName != null)
+      {
+         ServiceAttributeMetaData ws = new ServiceAttributeMetaData();
+         ws.setName("WebServiceName");
+         ServiceDependencyValueMetaData wsDepends = new ServiceDependencyValueMetaData();
+         wsDepends.setDependency(wsName);
+         ws.setValue(wsDepends);
+         attrs.add(ws);
+      }
       // Injection of the TimerService
       ServiceAttributeMetaData tms = new ServiceAttributeMetaData();
       ServiceDependencyValueMetaData tmsDepends = new ServiceDependencyValueMetaData();

Added: trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployerMBean.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployerMBean.java	                        (rev 0)
+++ trunk/server/src/main/org/jboss/ejb/deployers/EjbDeployerMBean.java	2007-09-04 15:21:29 UTC (rev 65045)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb.deployers;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+
+/**
+ * EJBDeployerMBean.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface EjbDeployerMBean
+{
+   /** The default ObjectName */
+   ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ejb:service=EJBDeployer");
+   
+   /**
+    * Whether ear deployments should be call by value
+    */
+   void setCallByValue(boolean callByValue);   
+   boolean isCallByValue();
+
+   /**
+    * Enables/disables the application bean verification upon deployment.
+   void setVerifyDeployments(boolean verify);
+   boolean getVerifyDeployments();
+    */
+   
+   /**
+    * Enables/disables the verbose mode on the verifier.
+   void setVerifierVerbose(boolean verbose);
+   boolean getVerifierVerbose();   
+    */
+
+   /**
+    * Enables/disables the strict mode on the verifier.
+   void setStrictVerifier(boolean strictVerifier);
+   boolean getStrictVerifier();
+    */
+   
+   /**
+    * Enables/disables the metrics interceptor for containers.
+   void setMetricsEnabled(boolean enable);
+   boolean isMetricsEnabled();
+    */
+   
+   /**
+    * The dynamic class loading simple web server name.
+    */
+   void setWebServiceName(String webServiceName);
+   String getWebServiceName();
+   
+   /**
+    * The TransactionManagerServiceName.
+    */
+   void setTransactionManagerServiceName(String transactionManagerServiceName);
+   String getTransactionManagerServiceName();
+}




More information about the jboss-cvs-commits mailing list