org.ow2.jonas.lib.management.extensions.base
Class AdminJmxHelper

java.lang.Object
  extended by org.ow2.jonas.lib.management.extensions.base.AdminJmxHelper
Direct Known Subclasses:
JonasAdminJmx

public class AdminJmxHelper
extends Object

Jmx helper for administration.

Author:
eyindanga, danesa

Field Summary
protected static String AppClientModule
          Constant for client module.
protected static String EJBModule
          Constant for ejb module.
protected static String J2EEApplication
          J2ee application constant.
protected static String ResourceAdapterModule
          Constant for rar module.
protected static Object s_Synchro
          Object used for synchronization.
protected static String WebModule
          Constant for web module.
 
Constructor Summary
protected AdminJmxHelper()
          Default constructor.
 
Method Summary
static String extractFilename(String p_Path)
          Extract the filename of complete path.
static String extractValueMbeanName(String pName, String pMBeanName)
          Extract the value of a key property from the MBean name.
static String findDeployedPath(ArrayList<String> filesDeployed, String resourceName)
           
static String findSecurityFactorySubType(String p_NameFactory, String domainName, String serverName)
          Return the SubType of a Security Factory in the current server.
static ObjectName getArchiveConfigObjectName(String domainName, String serverName)
          Object name of archive configuration.
static String getConnectionUrl(String remoteServerName, String domainName, String serverName)
          Gives the JMX connection Url used in the domain to connect to a remote server.
static ArrayList getDatasourceDependences(String pDatasourceName, String domainName, String serverName)
          Return the list of Datasource dependences for a given datasource name in the current server.
static ArrayList getDatasourceFilesDeployable(String domainName, String serverName)
          Return the list of Datasource properties files ready to deploy in the current server.
static ArrayList getDatasourceFilesDeployed(String domainName, String serverName)
          Return the list of deployed Datasources in the current server.
static ArrayList<String> getDeployed(ArrayList<String> filesDeployed)
          Transform file names with absolute path on mave2 repositories to module (resource) names.
static String[] getDepmonitorDirs(String domainName, String serverName)
          Get the deployment repositories from 'depmonitor' MBean.
static ArrayList getEarFilesDeployable(String domainName, String serverName)
          Return the list of EAR filename ready to deploy in the current server.
static ArrayList getEarFilesDeployed(String domainName, String serverName)
          Return the list of deployed EAR filename in the current server.
static ArrayList[] getFamiliesMbeansLists(String serverName)
          Create a list for each family of Mbean.
static ArrayList getFilesDeployable(String domainName, String serverName)
           
static ArrayList getFilesDeployed(String domainName, String serverName)
          Return the list of deployed filename in the current server.
static ObjectName getFirstMbean(ObjectName p_On, String serverName)
          Return the first ObjectName Mbean gotten by the query in the current MbeanServer.
static String getFirstMBeanName(ObjectName p_On, String serverName)
          Return the first MBean name found by the query in the current MBeanServer.
static ArrayList getGroups(String domainName, String p_Resource, String serverName)
          Return the list of all groups in a resource.
static ObjectName getJ2eeServerObjectName(String serverName)
          Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer.
static ObjectName getJ2eeServerObjectName(String p_DomainName, String serverName)
          Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer and belonging to a domain.
static ArrayList getJarFilesDeployable(String domainName, String serverName)
          Return the list of JAR filename ready to deploy in the current server.
static ArrayList getJarFilesDeployed(String domainName, String serverName)
          Return the list of deployed JAR filename in the current server.
static List getListMbean(ObjectName p_On, String serverName)
          Return the list of ObjectName Mbean gotten by the query in the current MbeanServer.
static List getListMBeanName(ObjectName p_On, String serverName)
          Return the list of Mbean name gotten by the query in the current MbeanServer.
static ArrayList getMailFactoryDependences(String p_MailFactoryName, AdminHelper p_AdminHelper)
          Return the list of Mail factory dependences in the current server for a given factory name.
static ArrayList getMailFilesDeployable(String domainName, String serverName)
          Return the list of Mail factory files ready to deploy in the current server.
static ArrayList getMailFilesDeployed(AdminHelper p_AdminHelper)
          Return the list of deployed Mail factories in the current server.
static ArrayList getMbeansLists(String serverName)
          Create a list for each family of Mbean.
static ArrayList getMimeMailPartFactoriesDeployed(AdminHelper p_AdminHelper)
          Return the list of deployed MimePartDatasource Mail Factories in the current server.
static ArrayList getMimePartMailFilesDeployable(String domainName, String serverName)
          Return the list of MimePartDataSource Mail factory files ready to deploy in the current server.
static ArrayList getMimePartMailFilesDeployed(AdminHelper p_AdminHelper)
          Return the list of deployed MimePartDataSource Mail factories in the current server.
static ArrayList getQueuesList(String domainName, String serverName)
          Return the Queue destinations list.
static ObjectName getRarConfigObjectName(String domainName, String serverName)
          Object name of rar configuration.
static ArrayList getRarFilesDeployable(String domainName, String serverName)
          Return the list of RAR filename ready to deploy in the current server.
static ArrayList getRarFilesDeployed(String domainName, String serverName)
          Return the list of deployed RAR filename in the current server.
static String[] getRepositoryDirs(String domainName, String serverName)
          Get the deployment repositories from 'repository' MBean.
static ArrayList getRoles(String domainName, String p_Resource, String serverName)
          Return the list of all roles in a resource.
static ArrayList getSecurityDatasourceFactories(String domainName, String serverName)
          Return the list of Security Datasource Factories in the current server.
static ArrayList getSecurityLdapFactories(String domainName, String serverName)
          Return the list of Security Ldap Factories in the current server.
static ArrayList getSecurityMemoryFactories(String domainName, String serverName)
          Return the list of Security Memory Factories in the current server.
static ArrayList getSessionMailFactoriesDeployed(AdminHelper p_AdminHelper)
          Return the list of deployed Session Mail Factories in the current server.
static ArrayList getSessionMailFilesDeployable(String domainName, String serverName)
          Return the list of Session Mail factory files ready to deploy in the current server.
static ArrayList getSessionMailFilesDeployed(AdminHelper p_AdminHelper)
          Return the list of deployed Session Mail factories in the current server.
static ObjectName getTomcatSecurityRealm(String domainName, String serverName)
          Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer.
static ArrayList<RealmItem> getTomcatSecurityRealms(String usedRealmName, String domainName, String serverName)
           
static ArrayList getTopicsList(String domainName, String serverName)
          Return the Topic destinations list.
static Map getTotalEJB(ObjectName moduleOn)
          Get the total number of EJBs in a EJBModule
static Map getTotalEJB(String domainName, String serverName)
          Get the total number of EJBs in a server
static int getTotalNbStatefulSessionBeans(String domainName, String serverName)
          Get all StatefulSessionBeans in a server
static ArrayList getUsers(String domainName, String p_Resource, String serverName)
          Return the list of all users in a resource.
static ArrayList getWarFilesDeployable(String domainName, String serverName)
          Return the list of WAR filename ready to deploy in the current server.
static ArrayList getWarFilesDeployed(String domainName, String serverName)
          Return the list of deployed WAR filename in the current server.
static boolean hasMBeanName(ObjectName p_On, String serverName)
          Verify if the Mbean gotten by the query in the current MbeanServer exists.
static boolean isAppClientModule(ObjectName pObjectName)
           
static boolean isDepmonitorDir(String dir, String domainName, String serverName)
          Check with 'depmonitor' MBean if a given directory is a depmonitor directory
static boolean isEJBModule(ObjectName pObjectName)
           
static boolean isJ2EEApplication(ObjectName pObjectName)
           
static boolean isResourceAdapterModule(ObjectName pObjectName)
           
static boolean isWebModule(ObjectName pObjectName)
           
static ArrayList prepareContainersToDisplay(ArrayList p_Containers, String p_ContainerDir, String p_EarDir)
          Prepare a list of containers to diplay.
static String replace(String template, String placeholder, String value)
          Replace any occurrence of the specified placeholder in the specified template string with the specified replacement value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_Synchro

protected static Object s_Synchro
Object used for synchronization.


J2EEApplication

protected static final String J2EEApplication
J2ee application constant.

See Also:
Constant Field Values

AppClientModule

protected static final String AppClientModule
Constant for client module.

See Also:
Constant Field Values

EJBModule

protected static final String EJBModule
Constant for ejb module.

See Also:
Constant Field Values

WebModule

protected static final String WebModule
Constant for web module.

See Also:
Constant Field Values

ResourceAdapterModule

protected static final String ResourceAdapterModule
Constant for rar module.

See Also:
Constant Field Values
Constructor Detail

AdminJmxHelper

protected AdminJmxHelper()
Default constructor.

Method Detail

replace

public static String replace(String template,
                             String placeholder,
                             String value)
Replace any occurrence of the specified placeholder in the specified template string with the specified replacement value.

Parameters:
template - Pattern string possibly containing the placeholder
placeholder - Placeholder expression to be replaced
value - Replacement value for the placeholder
Returns:
A complete string

getArchiveConfigObjectName

public static ObjectName getArchiveConfigObjectName(String domainName,
                                                    String serverName)
Object name of archive configuration.

Parameters:
domainName - The domain name
serverName - The server name
Returns:
ObjectName corresponding to the archive configuration

getRarConfigObjectName

public static ObjectName getRarConfigObjectName(String domainName,
                                                String serverName)
Object name of rar configuration.

Parameters:
domainName - The domain name
serverName - The server name
Returns:
Corresponding ObjectName

getJ2eeServerObjectName

public static ObjectName getJ2eeServerObjectName(String p_DomainName,
                                                 String serverName)
                                          throws ManagementException
Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer and belonging to a domain. We should have one ObjectName corresponding to the current JOnAS server instance.

Parameters:
p_DomainName - The name of the management domain.
Returns:
an ObjectName which corresponds to a J2EEServer ObjectName pattern or null if no J2EEServer found for the given management domain (having j2eeType key property equal to J2EEServer)
Throws:
ManagementException - if could not connect to the MBean server

getJ2eeServerObjectName

public static ObjectName getJ2eeServerObjectName(String serverName)
Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer. This method is used by EditTopAction to determine the list of JOnAS servers registered in the current registry (this code is particular to the current domain concept implementation). We should have one ObjectName corresponding to the current JOnAS server instance.

Returns:
an ObjectName which corresponds to a J2EEServer ObjectName pattern (having j2eeType key property equal to J2EEServer)

isJ2EEApplication

public static boolean isJ2EEApplication(ObjectName pObjectName)
Parameters:
pObjectName - The objectName
Returns:
true if J2ee application

isAppClientModule

public static boolean isAppClientModule(ObjectName pObjectName)
Parameters:
pObjectName - The objectName
Returns:
true if client module.

isEJBModule

public static boolean isEJBModule(ObjectName pObjectName)
Parameters:
pObjectName - The objectName.
Returns:
true if ejb module.

isWebModule

public static boolean isWebModule(ObjectName pObjectName)
Parameters:
pObjectName - The objectName.
Returns:
true if web module.

isResourceAdapterModule

public static boolean isResourceAdapterModule(ObjectName pObjectName)
Parameters:
pObjectName - true if ejb module.
Returns:
true if rar module

hasMBeanName

public static boolean hasMBeanName(ObjectName p_On,
                                   String serverName)
                            throws ManagementException
Verify if the Mbean gotten by the query in the current MbeanServer exists.

Parameters:
p_On - Query Mbean name to search
Returns:
true if MBean exists
Throws:
ManagementException

getFirstMBeanName

public static String getFirstMBeanName(ObjectName p_On,
                                       String serverName)
                                throws ManagementException
Return the first MBean name found by the query in the current MBeanServer.

Parameters:
p_On - Query MBean name to search
Returns:
The first MBean name or null if not found
Throws:
ManagementException

getListMBeanName

public static List getListMBeanName(ObjectName p_On,
                                    String serverName)
Return the list of Mbean name gotten by the query in the current MbeanServer.

Parameters:
p_On - Query Mbean name to search
Returns:
A list of string Mbean name

getFirstMbean

public static ObjectName getFirstMbean(ObjectName p_On,
                                       String serverName)
                                throws ManagementException
Return the first ObjectName Mbean gotten by the query in the current MbeanServer.

Parameters:
p_On - Query Mbean name to search
Returns:
The first ObjectName or null if not found
Throws:
ManagementException

getListMbean

public static List getListMbean(ObjectName p_On,
                                String serverName)
                         throws ManagementException
Return the list of ObjectName Mbean gotten by the query in the current MbeanServer.

Parameters:
p_On - Query Mbeans to search
Returns:
The list of ObjectName
Throws:
ManagementException

extractValueMbeanName

public static String extractValueMbeanName(String pName,
                                           String pMBeanName)
Extract the value of a key property from the MBean name. This method is usefull when we have the String form and not the ObjectName (avoid creating an ObjectName instance).

Parameters:
pName - Name of the key property
pMBeanName - Stringified ObjectName
Returns:
The value or null if not found

extractFilename

public static String extractFilename(String p_Path)
Extract the filename of complete path.

Parameters:
p_Path - Complete path (directory and filename)
Returns:
The filename or null

isDepmonitorDir

public static boolean isDepmonitorDir(String dir,
                                      String domainName,
                                      String serverName)
                               throws ManagementException
Check with 'depmonitor' MBean if a given directory is a depmonitor directory

Parameters:
dir - the name of the given directory
domainName - current domain name
serverName - current server name
Returns:
true if the given directory is a depmonitor directory
Throws:
ManagementException

getDepmonitorDirs

public static String[] getDepmonitorDirs(String domainName,
                                         String serverName)
                                  throws ManagementException
Get the deployment repositories from 'depmonitor' MBean.

Parameters:
domainName -
serverName -
Returns:
the current URL repositories.
Throws:
ManagementException

getRepositoryDirs

public static String[] getRepositoryDirs(String domainName,
                                         String serverName)
                                  throws ManagementException
Get the deployment repositories from 'repository' MBean.

Parameters:
domainName -
serverName -
Returns:
the current URL repositories.
Throws:
ManagementException

getFilesDeployable

public static ArrayList getFilesDeployable(String domainName,
                                           String serverName)
                                    throws ManagementException
Parameters:
domainName - the domain
serverName - the server
Returns:
the deployables
Throws:
ManagementException - any.

getJarFilesDeployable

public static ArrayList getJarFilesDeployable(String domainName,
                                              String serverName)
                                       throws ManagementException
Return the list of JAR filename ready to deploy in the current server.

Returns:
The list of JAR filename.
Throws:
ManagementException - any.

getJarFilesDeployed

public static ArrayList getJarFilesDeployed(String domainName,
                                            String serverName)
                                     throws ManagementException
Return the list of deployed JAR filename in the current server.

Returns:
The list of JAR filename.
Throws:
ManagementException - any.

getEarFilesDeployable

public static ArrayList getEarFilesDeployable(String domainName,
                                              String serverName)
                                       throws ManagementException
Return the list of EAR filename ready to deploy in the current server.

Returns:
The list of EAR filename.
Throws:
ManagementException - any.

getWarFilesDeployable

public static ArrayList getWarFilesDeployable(String domainName,
                                              String serverName)
                                       throws ManagementException
Return the list of WAR filename ready to deploy in the current server.

Returns:
The list of WAR filename.
Throws:
ManagementException - any.

getRarFilesDeployable

public static ArrayList getRarFilesDeployable(String domainName,
                                              String serverName)
                                       throws ManagementException
Return the list of RAR filename ready to deploy in the current server.

Returns:
The list of RAR filename.
Throws:
ManagementException - any.

getWarFilesDeployed

public static ArrayList getWarFilesDeployed(String domainName,
                                            String serverName)
                                     throws ManagementException
Return the list of deployed WAR filename in the current server.

Returns:
The list of WAR filename.
Throws:
ManagementException - any.

getEarFilesDeployed

public static ArrayList getEarFilesDeployed(String domainName,
                                            String serverName)
                                     throws ManagementException
Return the list of deployed EAR filename in the current server.

Returns:
The list of EAR filename.
Throws:
ManagementException - any.

getRarFilesDeployed

public static ArrayList getRarFilesDeployed(String domainName,
                                            String serverName)
                                     throws ManagementException
Return the list of deployed RAR filename in the current server.

Returns:
The list of RAR filename.
Throws:
ManagementException - any.

getFilesDeployed

public static ArrayList getFilesDeployed(String domainName,
                                         String serverName)
                                  throws ManagementException
Return the list of deployed filename in the current server.

Returns:
The list of filenames deployed.
Throws:
ManagementException - any.

prepareContainersToDisplay

public static ArrayList prepareContainersToDisplay(ArrayList p_Containers,
                                                   String p_ContainerDir,
                                                   String p_EarDir)
Prepare a list of containers to diplay. Deleting prefix root container directory, sorting the list.

Parameters:
p_Containers - The list of containers
p_ContainerDir - The root container directory
p_EarDir - The root ear directory or null
Returns:
The list of containers ready to display

getMailFilesDeployable

public static ArrayList getMailFilesDeployable(String domainName,
                                               String serverName)
                                        throws ManagementException
Return the list of Mail factory files ready to deploy in the current server.

Returns:
The list of Mail factory properties filenames.
Throws:
ManagementException - any.

getMimePartMailFilesDeployable

public static ArrayList getMimePartMailFilesDeployable(String domainName,
                                                       String serverName)
                                                throws ManagementException
Return the list of MimePartDataSource Mail factory files ready to deploy in the current server.

Returns:
The list of MimePartDataSource Mail factory properties filenames.
Throws:
ManagementException - any.

getSessionMailFilesDeployable

public static ArrayList getSessionMailFilesDeployable(String domainName,
                                                      String serverName)
                                               throws ManagementException
Return the list of Session Mail factory files ready to deploy in the current server.

Returns:
The list of Session Mail factory properties filenames.
Throws:
ManagementException - any.

getMimePartMailFilesDeployed

public static ArrayList getMimePartMailFilesDeployed(AdminHelper p_AdminHelper)
                                              throws ManagementException
Return the list of deployed MimePartDataSource Mail factories in the current server.

Parameters:
p_AdminHelper - The container AdminHelper
Returns:
The list of MimePartDataSource Mail factory filename.
Throws:
ManagementException - any.

getDeployed

public static ArrayList<String> getDeployed(ArrayList<String> filesDeployed)
Transform file names with absolute path on mave2 repositories to module (resource) names.

Parameters:
filesDeployed - list of file names
Returns:
list of file names having mave2 absolute paths converted

findDeployedPath

public static String findDeployedPath(ArrayList<String> filesDeployed,
                                      String resourceName)

getSessionMailFilesDeployed

public static ArrayList getSessionMailFilesDeployed(AdminHelper p_AdminHelper)
                                             throws ManagementException
Return the list of deployed Session Mail factories in the current server.

Parameters:
p_AdminHelper - The container AdminHelper
Returns:
The list of Session Mail factory filename.
Throws:
ManagementException - any.

getMailFilesDeployed

public static ArrayList getMailFilesDeployed(AdminHelper p_AdminHelper)
                                      throws ManagementException
Return the list of deployed Mail factories in the current server.

Parameters:
p_AdminHelper - The container AdminHelper
Returns:
The list of Mail factory filename.
Throws:
ManagementException - any.

getDatasourceFilesDeployable

public static ArrayList getDatasourceFilesDeployable(String domainName,
                                                     String serverName)
                                              throws ManagementException
Return the list of Datasource properties files ready to deploy in the current server.

Returns:
The list of Datasource properties filenames.
Throws:
ManagementException - Could not get management info from the MBeanServer

getDatasourceFilesDeployed

public static ArrayList getDatasourceFilesDeployed(String domainName,
                                                   String serverName)
                                            throws ManagementException
Return the list of deployed Datasources in the current server.

Parameters:
domainName - Current domain name
serverName - Current server name
Returns:
The list of Datasource filename.
Throws:
ManagementException - Could not get management info from the MBeanServer

getDatasourceDependences

public static ArrayList getDatasourceDependences(String pDatasourceName,
                                                 String domainName,
                                                 String serverName)
                                          throws ManagementException
Return the list of Datasource dependences for a given datasource name in the current server.

Parameters:
pDatasourceName - The name of the datasource
domainName - Current domain name
serverName - Current server name
Returns:
The list of Datasource dependence (a list of names corresponding to EJBs using this datasource).
Throws:
ManagementException - Could not get management info from the MBeanServer
MalformedObjectNameException - any.

getMailFactoryDependences

public static ArrayList getMailFactoryDependences(String p_MailFactoryName,
                                                  AdminHelper p_AdminHelper)
                                           throws ManagementException
Return the list of Mail factory dependences in the current server for a given factory name.

Parameters:
p_MailFactoryName - The name of the mail factory
p_AdminHelper - The container AdminHelper
Returns:
The list of Mail factory dependences (a list of names corresponding to EJBs using this mail factory).
Throws:
ManagementException - any.

getSessionMailFactoriesDeployed

public static ArrayList getSessionMailFactoriesDeployed(AdminHelper p_AdminHelper)
                                                 throws ManagementException
Return the list of deployed Session Mail Factories in the current server.

Parameters:
p_AdminHelper - The container AdminHelper
Returns:
The list
Throws:
ManagementException - any.

getMimeMailPartFactoriesDeployed

public static ArrayList getMimeMailPartFactoriesDeployed(AdminHelper p_AdminHelper)
                                                  throws ManagementException
Return the list of deployed MimePartDatasource Mail Factories in the current server.

Parameters:
p_AdminHelper - The container AdminHelper
Returns:
The list
Throws:
ManagementException - any.

getTomcatSecurityRealm

public static ObjectName getTomcatSecurityRealm(String domainName,
                                                String serverName)
                                         throws MalformedObjectNameException
Return the ObjectName corresponding to the J2EEServer managed object registered in the current MBeanServer. This method is used by EditTopAction to determine the list of JOnAS servers registered in the current registry (this code is particular to the current domain concept implementation). We should have one ObjectName corresponding to the current JOnAS server instance.

Returns:
an ObjectName which corresponds to a J2EEServer ObjectName pattern (having j2eeType key property equal to J2EEServer)
Throws:
MalformedObjectNameException

getTomcatSecurityRealms

public static ArrayList<RealmItem> getTomcatSecurityRealms(String usedRealmName,
                                                           String domainName,
                                                           String serverName)
                                                    throws MalformedObjectNameException
Throws:
MalformedObjectNameException

getSecurityMemoryFactories

public static ArrayList getSecurityMemoryFactories(String domainName,
                                                   String serverName)
                                            throws MalformedObjectNameException
Return the list of Security Memory Factories in the current server.

Returns:
The list of Security Memory Factories
Throws:
MalformedObjectNameException - any.

getSecurityDatasourceFactories

public static ArrayList getSecurityDatasourceFactories(String domainName,
                                                       String serverName)
                                                throws MalformedObjectNameException
Return the list of Security Datasource Factories in the current server.

Returns:
The list of Security Datasource Factories
Throws:
MalformedObjectNameException - any.

getSecurityLdapFactories

public static ArrayList getSecurityLdapFactories(String domainName,
                                                 String serverName)
                                          throws MalformedObjectNameException
Return the list of Security Ldap Factories in the current server.

Returns:
The list of Security Ldap Factories
Throws:
MalformedObjectNameException - any.

findSecurityFactorySubType

public static String findSecurityFactorySubType(String p_NameFactory,
                                                String domainName,
                                                String serverName)
                                         throws MalformedObjectNameException
Return the SubType of a Security Factory in the current server.

Parameters:
p_NameFactory - The factory name to find
Returns:
The SubType or null if not found
Throws:
ManagementException - any.
MalformedObjectNameException - if the objectName is malformed

getUsers

public static ArrayList getUsers(String domainName,
                                 String p_Resource,
                                 String serverName)
                          throws ManagementException,
                                 MalformedObjectNameException
Return the list of all users in a resource.

Parameters:
domainName - the domain name
p_Resource - The resource
Returns:
The list of users
Throws:
ManagementException - any.
MalformedObjectNameException - if the objectName is malformed

getRoles

public static ArrayList getRoles(String domainName,
                                 String p_Resource,
                                 String serverName)
                          throws ManagementException,
                                 MalformedObjectNameException
Return the list of all roles in a resource.

Parameters:
domainName - the domain name
p_Resource - The resource
Returns:
The list of roles
Throws:
ManagementException - any.
MalformedObjectNameException - if the objectName is malformed

getGroups

public static ArrayList getGroups(String domainName,
                                  String p_Resource,
                                  String serverName)
                           throws ManagementException,
                                  MalformedObjectNameException
Return the list of all groups in a resource.

Parameters:
domainName - the domain name
p_Resource - The resource
Returns:
The list of groups
Throws:
ManagementException - any.
MalformedObjectNameException - if the objectName is malformed

getQueuesList

public static ArrayList getQueuesList(String domainName,
                                      String serverName)
Return the Queue destinations list.

Returns:
The queue list.

getTopicsList

public static ArrayList getTopicsList(String domainName,
                                      String serverName)
Return the Topic destinations list.

Returns:
The topics list

getMbeansLists

public static ArrayList getMbeansLists(String serverName)
                                throws ManagementException
Create a list for each family of Mbean.

Returns:
An array of lists
Throws:
ManagementException

getFamiliesMbeansLists

public static ArrayList[] getFamiliesMbeansLists(String serverName)
                                          throws ManagementException
Create a list for each family of Mbean.

Returns:
An array of lists
Throws:
ManagementException

getTotalNbStatefulSessionBeans

public static int getTotalNbStatefulSessionBeans(String domainName,
                                                 String serverName)
Get all StatefulSessionBeans in a server

Parameters:
serverName - the server name
Returns:
the number of StatefulSessionBeans

getTotalEJB

public static Map getTotalEJB(String domainName,
                              String serverName)
Get the total number of EJBs in a server

Parameters:
serverName - the server name
domainName - the domain name
Returns:
map with the number of EJBs of different types where the key is the JSR77 type name

getTotalEJB

public static Map getTotalEJB(ObjectName moduleOn)
Get the total number of EJBs in a EJBModule

Parameters:
moduleOn - the EJBModule's ObjectName
Returns:
map with the number of EJBs of different types where the key is the JSR77 type name

getConnectionUrl

public static String getConnectionUrl(String remoteServerName,
                                      String domainName,
                                      String serverName)
                               throws MalformedObjectNameException
Gives the JMX connection Url used in the domain to connect to a remote server.

Parameters:
remoteServerName - name of the remote server
domainName - domain name
serverName - local server name
Returns:
the JMX connection Url used in the domain to connect to a remote server
Throws:
MalformedObjectNameException


Copyright © 2010 OW2 Consortium. All Rights Reserved.