|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.management.javaee.ManagedObject
org.ow2.jonas.lib.management.javaee.J2EEManagedObject
org.ow2.jonas.lib.jmbeans.J2EEServer
public class J2EEServer
The JSR77 J2EEServer MBean implementation. Implement the StateManagement and Events specified in the JSR77.
| Field Summary | |
|---|---|
static java.lang.String |
DEPL_EXTENSION
file extension containing a deployment plan |
| Fields inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject |
|---|
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME |
| Constructor Summary | |
|---|---|
J2EEServer()
MBean constructor. |
|
| Method Summary | |
|---|---|
void |
addJavaVM(java.lang.String objectName)
Add an object name to the javaVMs list. |
void |
bindVersioningService(VersioningService versioningService)
|
void |
deploy(java.lang.String fileName)
Deploy a file to a local deployer. |
java.lang.String |
distribute(java.lang.String fileName,
byte[] fileContent)
Dump the given bytes to a local file and then return the path to this file. |
java.util.Properties |
getConfigFileEnv()
|
long |
getCurrentTotalMemory()
|
long |
getCurrentUsedMemory()
|
protected org.ow2.util.ee.deploy.api.deployable.IDeployable |
getDeployable(java.lang.String fileName)
Convert a ready to deploy file to a deployable object. |
java.util.ArrayList<java.lang.String> |
getDeployableEars()
|
java.util.ArrayList<java.lang.String> |
getDeployableFiles()
|
java.util.ArrayList<java.lang.String> |
getDeployableJars()
|
java.util.ArrayList<java.lang.String> |
getDeployableRars()
|
java.util.ArrayList<java.lang.String> |
getDeployableWars()
|
java.util.ArrayList<java.lang.String> |
getDeployedEars()
|
java.util.ArrayList<java.lang.String> |
getDeployedFiles()
|
java.util.ArrayList<java.lang.String> |
getDeployedJars()
|
java.util.List<java.lang.String> |
getDeployedObjects()
|
java.util.ArrayList<java.lang.String> |
getDeployedRars()
|
java.util.ArrayList<java.lang.String> |
getDeployedWars()
|
java.lang.String |
getDomainName()
|
java.lang.String[] |
getEventTypes()
|
java.lang.String[] |
getJavaVMs()
|
java.lang.String |
getJonasBase()
|
java.lang.String |
getJonasRoot()
|
java.lang.String |
getJvmInfos()
|
java.lang.String |
getProtocols()
|
int |
getRange()
|
java.util.List<java.lang.String> |
getResources()
|
java.lang.String |
getServerName()
|
java.lang.String |
getServerVendor()
|
java.lang.String |
getServerVersion()
|
java.lang.String |
getServiceDescription(java.lang.String service)
Get a service description. |
java.util.List<java.lang.String> |
getServices()
Return the all the services names, whatever their state is. |
java.lang.String |
getServiceState(java.lang.String service)
Get a service state. |
int |
getSizeTableMeasures()
|
long |
getStartTime()
|
J2EEServerState |
getState()
|
java.lang.Long[] |
getTableMeasures()
|
java.lang.String |
getThreadStackDump()
Return a JVM thread stack dump. |
javax.management.openmbean.TabularData |
getThreadStackDumpList()
Return a TabularData containing a JVM thread stack dump. |
TimerManager |
getTimerManager()
|
java.lang.String |
getUploadDirectory()
Get the directory in which J2EEServer uploads files |
long |
getUptime()
|
java.lang.String |
getVersions()
|
void |
halt()
Halt the server. |
void |
handleNotification(javax.management.Notification notification,
java.lang.Object handback)
Treat JMX notifications. |
boolean |
isActivated()
|
boolean |
isDeployed(java.lang.String fileName)
|
boolean |
isFailed()
|
boolean |
isRunning()
|
boolean |
isStarting()
|
boolean |
isStopped()
|
boolean |
isStopping()
|
static java.lang.String |
jvmInfos()
|
void |
logThreadStackDump()
Log a JVM thread stack dump in JOnAS log file (level : info). |
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
After registering, add myself as listener to notifications emitted by: - the MBeanServerDelegate (to receive JMX registration/un-registration notifications). |
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
|
void |
printThreadStackDump(java.lang.String filename)
Print a JVM thread stack dump in a given file. |
boolean |
removeModuleFile(java.lang.String fileName)
Remove a specified J2EE module |
void |
runGC()
|
java.lang.String |
sendFile(byte[] fileContent,
java.lang.String fileName,
boolean replaceExisting)
|
void |
setActivated(boolean activated)
Set memory monitoring activation. |
void |
setArchiveManager(org.ow2.util.archive.api.IArchiveManager archiveManager)
|
void |
setConfigManager(ConfigurationManager configManager)
|
void |
setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
|
void |
setEasyBeansService(IEasyBeansService easyBeansService)
|
void |
setFailed()
|
void |
setRange(int range)
|
void |
setRegistryService(RegistryService registryService)
|
void |
setRepositoryManager(org.ow2.util.plan.repository.api.IRepositoryManager repositoryManager)
Set the repository manager used by this service. |
void |
setRunning()
|
void |
setServerProperties(ServerProperties serverProperties)
|
void |
setServiceManager(ServiceManager serviceManager)
|
void |
setSizeTableMeasures(int sizeTableMeasures)
|
void |
setStarting()
|
void |
setStopped()
|
void |
setStopping()
|
void |
setTimerManager(TimerManager timerManager)
|
void |
start()
Start the server by starting all the non-mandatory services. |
void |
start(boolean standby)
Start the server by starting all the non-mandatory services. |
void |
startJ2EEServer()
|
void |
startRecursive(boolean standby)
Start recursive. |
void |
startService(java.lang.String service)
Start a service. |
void |
stop()
Stop the server by stopping all the non-mandatory services. |
void |
stopService(java.lang.String service)
Stop a service. |
void |
unbindVersioningService()
Sets the versioning service to null. |
void |
undeploy(java.lang.String fileName)
Undeploy a file from a local deployer. |
| Methods inherited from class org.ow2.jonas.lib.management.javaee.J2EEManagedObject |
|---|
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider, setEventProvider, setObjectName, setStateManageable, setStatisticsProvider |
| Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject |
|---|
getModelMBean, sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEPL_EXTENSION
| Constructor Detail |
|---|
public J2EEServer()
| Method Detail |
|---|
public void startJ2EEServer()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String[] getEventTypes()
public long getStartTime()
public long getUptime()
public java.lang.String getServerVendor()
public java.lang.String getServerVersion()
public java.lang.String getServerName()
public java.lang.String getJonasBase()
public java.lang.String getJonasRoot()
public java.lang.String getProtocols()
public java.lang.String getVersions()
public boolean isActivated()
public void setActivated(boolean activated)
activated - public long getCurrentUsedMemory()
public long getCurrentTotalMemory()
public int getRange()
public void setRange(int range)
public int getSizeTableMeasures()
public void setSizeTableMeasures(int sizeTableMeasures)
public java.lang.Long[] getTableMeasures()
public java.util.List<java.lang.String> getResources()
public java.util.List<java.lang.String> getDeployedObjects()
public java.lang.String getDomainName()
public java.lang.String[] getJavaVMs()
public void addJavaVM(java.lang.String objectName)
javaVMs list.
objectName - Object name corresponding to a JVM MBeanpublic void bindVersioningService(VersioningService versioningService)
versioningService - The versioning service to set.public void unbindVersioningService()
public void start()
throws java.lang.Exception
java.lang.Exception
public void start(boolean standby)
throws java.lang.Exception
standby - true to activate standby mode.
java.lang.Exception - any.
public void startRecursive(boolean standby)
throws java.lang.Exception
standby - true to activate standby mode.
java.lang.Exception - any.
public void stop()
throws java.lang.Exception
java.lang.Exception
public void halt()
throws java.lang.Exception
java.lang.Exception
public void handleNotification(javax.management.Notification notification,
java.lang.Object handback)
handleNotification in interface javax.management.NotificationListenernotification - received notificationhandback - hand back objectpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationpublic void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistration
public void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exception
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void setStarting()
setStarting in interface J2EEServerServicepublic static java.lang.String jvmInfos()
public void setRunning()
setRunning in interface J2EEServerServicepublic void setStopping()
setStopping in interface J2EEServerServicepublic void setStopped()
setStopped in interface J2EEServerServicepublic void setFailed()
setFailed in interface J2EEServerServicepublic J2EEServerState getState()
public boolean isStarting()
isStarting in interface J2EEServerServicepublic boolean isRunning()
isRunning in interface J2EEServerServicepublic boolean isFailed()
isFailed in interface J2EEServerServicepublic boolean isStopping()
isStopping in interface J2EEServerServicepublic boolean isStopped()
isStopped in interface J2EEServerServicepublic void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManager - reference to the deployerManagerpublic void setRepositoryManager(org.ow2.util.plan.repository.api.IRepositoryManager repositoryManager)
repositoryManager - the new repository manager.public void setArchiveManager(org.ow2.util.archive.api.IArchiveManager archiveManager)
archiveManager - reference to the archiveManagerpublic void setServiceManager(ServiceManager serviceManager)
serviceManager - reference to the serviceManagerpublic void deploy(java.lang.String fileName)
fileName - the name of the file to deploypublic void undeploy(java.lang.String fileName)
fileName - the name of the file to undeployprotected org.ow2.util.ee.deploy.api.deployable.IDeployable getDeployable(java.lang.String fileName)
fileName - the name of the file
public boolean isDeployed(java.lang.String fileName)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getJvmInfos()
public void runGC()
throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic java.util.Properties getConfigFileEnv()
public void setConfigManager(ConfigurationManager configManager)
public TimerManager getTimerManager()
public void setTimerManager(TimerManager timerManager)
public void setServerProperties(ServerProperties serverProperties)
public void setRegistryService(RegistryService registryService)
public void setEasyBeansService(IEasyBeansService easyBeansService)
public java.util.ArrayList<java.lang.String> getDeployableFiles()
public java.util.ArrayList<java.lang.String> getDeployableJars()
public java.util.ArrayList<java.lang.String> getDeployableEars()
public java.util.ArrayList<java.lang.String> getDeployableWars()
public java.util.ArrayList<java.lang.String> getDeployableRars()
public java.util.ArrayList<java.lang.String> getDeployedWars()
throws java.lang.Exception
java.lang.NullPointerException
javax.management.MalformedObjectNameException
javax.management.ReflectionException
javax.management.MBeanException
javax.management.InstanceNotFoundException
javax.management.AttributeNotFoundException
java.lang.Exception
public java.util.ArrayList<java.lang.String> getDeployedJars()
throws java.lang.Exception
java.lang.Exception
public java.util.ArrayList<java.lang.String> getDeployedRars()
throws java.lang.Exception
java.lang.Exception
public java.util.ArrayList<java.lang.String> getDeployedEars()
throws java.lang.Exception
java.lang.Exception
public java.util.ArrayList<java.lang.String> getDeployedFiles()
throws java.lang.Exception
java.lang.Exception
public java.lang.String sendFile(byte[] fileContent,
java.lang.String fileName,
boolean replaceExisting)
throws java.lang.Exception
java.lang.Exception
public java.lang.String distribute(java.lang.String fileName,
byte[] fileContent)
throws java.lang.Exception
fileName - the name of the file to distributefileContent - the content of the given file
java.lang.Exception
public boolean removeModuleFile(java.lang.String fileName)
throws java.lang.Exception
fileName - Name of file to remove
java.lang.Exception - if remove failspublic java.lang.String getUploadDirectory()
getUploadDirectory in interface J2EEServerServicepublic java.util.List<java.lang.String> getServices()
public java.lang.String getServiceDescription(java.lang.String service)
service - the service name.
public java.lang.String getServiceState(java.lang.String service)
service - the service name.
public void startService(java.lang.String service)
throws java.lang.Exception
service - the service name.
java.lang.Exception - If the startup of the service fails
public void stopService(java.lang.String service)
throws java.lang.Exception
service - the service name.
java.lang.Exception - If the stop of the service failspublic java.lang.String getThreadStackDump()
public void printThreadStackDump(java.lang.String filename)
filename - the file namepublic void logThreadStackDump()
public javax.management.openmbean.TabularData getThreadStackDumpList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||