|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.modeler.BaseModelMBean org.objectweb.jonas.server.J2EEServerMBean
MBean class for Server management. Two classes are used to provide all management services : J2EEServer and J2EEServerMBean. This class provide the notification's process when add or remove resources.
Field Summary |
Fields inherited from class org.apache.commons.modeler.BaseModelMBean |
attributeBroadcaster, attributes, generalBroadcaster, info, oname, registry, resource, resourceType, source |
Constructor Summary | |
J2EEServerMBean()
Default constructor |
Method Summary | |
void |
addNotificationListener(javax.management.NotificationListener pListner,
javax.management.NotificationFilter pFilter,
java.lang.Object pHandback)
Add a new listener. |
java.lang.String |
deployEar(java.lang.String fileName)
Deploy a J2EE application packaged in a EAR file |
java.lang.String |
deployFile(java.lang.Integer typeparam,
java.lang.Byte[] bfile,
java.lang.String filename,
java.lang.String[] genicArgs,
java.lang.Boolean moveIntoDeployableDirectory)
Deploy file (GenIC), needed for Ishmael to work. |
java.lang.String |
deployJar(java.lang.String fileName)
Deploy a stand-alone J2EE module packaged in a JAR file |
void |
deployLocalFile(java.lang.String pathname,
java.lang.String[] genicArgs)
Deploy local file and generate classes with Genic tool |
java.lang.String |
deployRar(java.lang.String fileName)
Deploy a J2EE application packaged in a RAR file |
void |
deployWar(java.lang.String fileName)
Deploy a stand-alone J2EE module packaged in a War file |
java.lang.String[] |
getDeployedObjects()
All The MBean names corresponding to the deployed J2EEModules (ear, jar, war, rar). |
java.lang.String[] |
getJavaVMs()
All The MBean names corresponding to the used JVMs. |
java.lang.String[] |
getResources()
All The MBean names corresponding to the deployed J2EEResources. |
java.lang.Boolean |
isEarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
java.lang.Boolean |
isJarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
java.lang.Boolean |
isRarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
java.lang.Boolean |
isWarDeployed(java.lang.String fileName)
Test if the specified filename is already deployed or not. |
java.lang.Boolean |
removeModuleFile(java.lang.String fileName)
Remove a specified J2EE module |
java.lang.String |
sendFile(byte[] fileContent,
java.lang.String fileName,
boolean replaceExisting)
Send a file to JOnAS Base with the given input stream and write it in the corresponding directory, ie JONAS_BASE/apps, JONAS_BASE/ejbjars, etc. |
void |
sendNotification(javax.management.Notification pNotification)
Send a notification to the listener. |
java.lang.String |
wsgenLocalFile(java.lang.String pathname,
java.lang.Boolean unpacked)
Apply WsGen on a local file and generate webservices artifacts |
Methods inherited from class org.apache.commons.modeler.BaseModelMBean |
addAttributeChangeNotificationListener, createDefaultModelMBeanInfo, createResource, getAttribute, getAttributes, getClassName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, getRegistry, initModelInfo, invoke, isModelMBeanInfoValid, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, setAttribute, setAttributes, setManagedResource, setModeledType, setModelMBeanInfo, setRegistry, store, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public J2EEServerMBean() throws javax.management.MBeanException
javax.management.MBeanException
- if super constructor failsMethod Detail |
public java.lang.String[] getDeployedObjects()
public java.lang.String[] getResources()
public java.lang.String[] getJavaVMs()
public void sendNotification(javax.management.Notification pNotification)
pNotification
- The notification to sendpublic void addNotificationListener(javax.management.NotificationListener pListner, javax.management.NotificationFilter pFilter, java.lang.Object pHandback) throws java.lang.IllegalArgumentException
pListner
- Listener to notifypFilter
- Notification filterpHandback
- ??
java.lang.IllegalArgumentException
- if notification is not donepublic java.lang.String deployJar(java.lang.String fileName) throws java.lang.Exception
fileName
- file name
java.lang.Exception
- Management operation failedpublic void deployWar(java.lang.String fileName) throws java.lang.Exception
fileName
- file name
java.lang.Exception
- Management operation failedpublic java.lang.String deployEar(java.lang.String fileName) throws java.lang.Exception
fileName
- file name
java.lang.Exception
- Management operation failedpublic java.lang.String deployRar(java.lang.String fileName) throws java.lang.Exception
fileName
- file name
java.lang.Exception
- Management operation failedpublic java.lang.Boolean isEarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the ear file.
java.lang.Exception
- Management operation failedpublic java.lang.Boolean isRarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the rar file.
java.lang.Exception
- Management operation failedpublic java.lang.Boolean isJarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the jar file.
java.lang.Exception
- Management operation failedpublic java.lang.Boolean isWarDeployed(java.lang.String fileName) throws java.lang.Exception
fileName
- the name of the War file.
java.lang.Exception
- Management operation failedpublic void deployLocalFile(java.lang.String pathname, java.lang.String[] genicArgs)
pathname
- : local path name to the applicationgenicArgs
- : list of genic's parameterspublic java.lang.String wsgenLocalFile(java.lang.String pathname, java.lang.Boolean unpacked)
pathname
- : local path name to the componentunpacked
- true if we want to have an unpacked directory as result
public java.lang.String deployFile(java.lang.Integer typeparam, java.lang.Byte[] bfile, java.lang.String filename, java.lang.String[] genicArgs, java.lang.Boolean moveIntoDeployableDirectory)
typeparam
- type of the file (EJB, WAR, EAR, RAR, CAR)bfile
- bytes array of the filefilename
- basename of the file to be deployed (if moveIntoDeployableDirectory full path name because local file)genicArgs
- arguments for GenICmoveIntoDeployableDirectory
- true to copy the file into the deployable JOnAS_BASE directory
RemoteException
EarServiceException
ResourceServiceException
JWebContainerServiceException
public java.lang.String sendFile(byte[] fileContent, java.lang.String fileName, boolean replaceExisting) throws java.lang.Exception
fileContent
- the content (bytes) of the filefileName
- name of the filereplaceExisting
- replace existing file if any
java.lang.Exception
- if file is already present and if the user don't want to replace existing file.public java.lang.Boolean removeModuleFile(java.lang.String fileName) throws java.lang.Exception
fileName
- Name of file to remove
java.lang.Exception
- if remove fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |