Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding system-jmx module with ServiceMBean interface, adding new modu…
…le as automatically dependency for sar deployments, reusing existent integration test to validate deploy of ServiceMBeans I (Kabir squashed this commit) so it also includes the following: -adding limited support for ServiceMBeanSupport -reverting usage of servicembean by an existent integration test -removing dep from sar to system-jmx, only needed by deployments, and making deployment dep to system-jmx optional -changing all lifecycle related logs to debug level, except exceptions due to user code, and activating checkstyle maven plugin -reverting pom.xml license info mess introduced by Eclipse
- Loading branch information
Showing
16 changed files
with
1,187 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
build/src/main/resources/modules/org/jboss/as/system-jmx/main/module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ JBoss, Home of Professional Open Source. | ||
~ Copyright 2012, Red Hat, Inc., and individual contributors | ||
~ as indicated by the @author tags. See the copyright.txt file 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. | ||
--> | ||
|
||
<module xmlns="urn:jboss:module:1.1" name="org.jboss.as.system-jmx"> | ||
<properties> | ||
<property name="jboss.api" value="private"/> | ||
</properties> | ||
|
||
<resources> | ||
<!-- Insert resources here --> | ||
</resources> | ||
|
||
<dependencies> | ||
<module name="javax.api"/> | ||
<module name="org.jboss.common-beans"/> | ||
<module name="org.jboss.staxmapper"/> | ||
<module name="org.jboss.as.controller"/> | ||
<module name="org.jboss.as.server"/> | ||
<module name="org.jboss.as.ee"/> | ||
<module name="org.jboss.as.jmx"/> | ||
<module name="org.jboss.modules"/> | ||
<module name="org.jboss.msc"/> | ||
<module name="org.jboss.logging"/> | ||
<module name="org.jboss.vfs"/> | ||
<module name="org.jboss.metadata"/> | ||
</dependencies> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ JBoss, Home of Professional Open Source. | ||
~ Copyright 2012, Red Hat, Inc., and individual contributors | ||
~ as indicated by the @author tags. See the copyright.txt file 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. | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.jboss.as</groupId> | ||
<artifactId>jboss-as-parent</artifactId> | ||
<version>7.2.0.Alpha1-SNAPSHOT</version> | ||
</parent> | ||
|
||
<groupId>org.jboss.as</groupId> | ||
<artifactId>jboss-as-system-jmx</artifactId> | ||
<version>7.2.0.Alpha1-SNAPSHOT</version> | ||
|
||
<name>JBoss Application Server: System JMX Module</name> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<compilerArgument> | ||
-AgeneratedTranslationFilesPath=${project.build.directory}/generated-translation-files | ||
</compilerArgument> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<includes> | ||
<include>**/*TestCase.java</include> | ||
</includes> | ||
<enableAssertions>false</enableAssertions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.jboss.logging</groupId> | ||
<artifactId>jboss-logging</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.logging</groupId> | ||
<artifactId>jboss-logging-processor</artifactId> | ||
<!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other | ||
projects that depend on this project.--> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source. | ||
* Copyright 2012, Red Hat Middleware LLC, and individual contributors | ||
* as indicated by the @author tags. See the copyright.txt file 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.system; | ||
|
||
/** | ||
* The Service interface. | ||
* | ||
* @author <a href="mailto:marc.fleury@jboss.org">Marc Fleury</a>. | ||
* @version $Revision: 81032 $ | ||
*/ | ||
public interface Service { | ||
/** | ||
* create the service, do expensive operations etc | ||
* | ||
* @throws Exception for any error | ||
*/ | ||
void create() throws Exception; | ||
|
||
/** | ||
* start the service, create is already called | ||
* | ||
* @throws Exception for any error | ||
*/ | ||
void start() throws Exception; | ||
|
||
/** | ||
* stop the service | ||
*/ | ||
void stop(); | ||
|
||
/** | ||
* destroy the service, tear down | ||
*/ | ||
void destroy(); | ||
} |
76 changes: 76 additions & 0 deletions
76
system-jmx/src/main/java/org/jboss/system/ServiceMBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source. | ||
* Copyright 2012, Red Hat Middleware LLC, and individual contributors | ||
* as indicated by the @author tags. See the copyright.txt file 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.system; | ||
|
||
/** | ||
* An interface describing a JBoss service MBean. | ||
* | ||
* @see Service | ||
* @see ServiceMBeanSupport | ||
* | ||
* @author <a href="mailto:rickard.oberg@telkel.com">Rickard Oberg</a> | ||
* @author <a href="mailto:andreas@jboss.org">Andreas Schaefer</a> | ||
* @author Scott.Stark@jboss.org | ||
* @version $Revision: 81033 $ | ||
*/ | ||
public interface ServiceMBean extends Service { | ||
// Constants ----------------------------------------------------- | ||
|
||
/** ServiceController notification types corresponding to service lifecycle events */ | ||
String CREATE_EVENT = "org.jboss.system.ServiceMBean.create"; | ||
String START_EVENT = "org.jboss.system.ServiceMBean.start"; | ||
String STOP_EVENT = "org.jboss.system.ServiceMBean.stop"; | ||
String DESTROY_EVENT = "org.jboss.system.ServiceMBean.destroy"; | ||
|
||
String[] states = { "Stopped", "Stopping", "Starting", "Started", "Failed", "Destroyed", "Created", | ||
"Unregistered", "Registered" }; | ||
|
||
/** The Service.stop has completed */ | ||
int STOPPED = 0; | ||
/** The Service.stop has been invoked */ | ||
int STOPPING = 1; | ||
/** The Service.start has been invoked */ | ||
int STARTING = 2; | ||
/** The Service.start has completed */ | ||
int STARTED = 3; | ||
/** There has been an error during some operation */ | ||
int FAILED = 4; | ||
/** The Service.destroy has completed */ | ||
int DESTROYED = 5; | ||
/** The Service.create has completed */ | ||
int CREATED = 6; | ||
/** The MBean has been created but has not completed MBeanRegistration.postRegister */ | ||
int UNREGISTERED = 7; | ||
/** The MBean has been created and has completed MBeanRegistration.postRegister */ | ||
int REGISTERED = 8; | ||
|
||
// Public -------------------------------------------------------- | ||
|
||
String getName(); | ||
|
||
int getState(); | ||
|
||
String getStateString(); | ||
|
||
/** Detyped lifecycle invocation */ | ||
void jbossInternalLifecycle(String method) throws Exception; | ||
} |
Oops, something went wrong.