EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.services.mbean
Interface MBeanRuntimeServicesMBean

All Known Subinterfaces:
MBeanGlassfishRuntimeServicesMBean, MBeanJBossRuntimeServicesMBean, MBeanWebLogicRuntimeServicesMBean, MBeanWebSphereRuntimeServicesMBean
All Known Implementing Classes:
MBeanGlassfishRuntimeServices, MBeanJBossRuntimeServices, MBeanRuntimeServices, MBeanWebLogicRuntimeServices, MBeanWebSphereRuntimeServices

public interface MBeanRuntimeServicesMBean

Purpose: Provide a dynamic interface into the EclipseLink Session.

Description: This class is meant to provide an interface for gaining access to configuration of the EclipseLink Session during runtime. It provides the basis for a JMX MBean


Method Summary
 void addNewConnectionPool(java.lang.String poolName, int maxSize, int minSize, java.lang.String platform, java.lang.String driverClassName, java.lang.String url, java.lang.String userName, java.lang.String password)
          This method provides client with access to add a new connection pool to a TopLink ServerSession.
 void clearStatementCache()
          Used to clear the statement cache.
 java.lang.String getApplicationName()
          getApplicationName(): Answer the name of the module (EAR name) that this session is associated with.
 java.util.List getAvailableConnectionPools()
          This method will return the available Connection pools within this Server Session
 java.util.List getClassesInSession()
          This method is used to return those Class Names that have identity Maps in the Session.
 java.lang.Object[][] getClassSummaryDetails()
          Provide an instance of 2 Dimensional Array simulating tabular format information about all classes in the session.
 java.util.List<ClassSummaryDetailBase> getClassSummaryDetailsArray()
          Provide a list of instance of ClassSummaryDetail containing information about all classes in the session.
 java.lang.Object[][] getClassSummaryDetailsUsingFilter(java.lang.String filter)
          Provide an instance of 2 Dimensional Array simulating tabular format information about all classes in the session whose class names match the provided filter.
 java.util.List<ClassSummaryDetailBase> getClassSummaryDetailsUsingFilterArray(java.lang.String filter)
          Provide a list of instance of ClassSummaryDetail containing information about the classes in the session whose class names match the provided filter.
 java.lang.String getConnectionPoolType()
          Return connection pool type.
 java.lang.String getCurrentEclipseLinkLogLevel()
          Answer the EclipseLink log level that is changeable.
 java.lang.String getDatabasePlatform()
          Return the database platform used by the DatabaseSession.
 java.lang.String getDeployedEclipseLinkLogLevel()
          Answer the EclipseLink log level at deployment time.
 java.lang.String getDriver()
          Return db driver class name.
 java.lang.String getJdbcConnectionDetails()
          Return JDBCConnection detail information.
 java.lang.String getLogFilename()
          Return the log filename.
 java.lang.String getLogType()
          Return the log type, either "EclipseLink", "Java" or the simple name of the logging class used.
 java.util.Vector getMappedClassNamesUsingFilter(java.lang.String filter)
          INTERNAL: This method traverses the EclipseLink descriptors and returns a Vector of the descriptor's reference class names that match the provided filter.
 java.lang.Integer getMaxSizeForPool(java.lang.String poolName)
          This method will retrieve the max size of a particular connection pool
 java.lang.Integer getMinSizeForPool(java.lang.String poolName)
          This method will retrieve the min size of a particular connection pool
 java.lang.String getModuleName()
          getModuleName(): Answer the name of the context-root of the application that this session is associated with.
 java.lang.Integer getNumberOfObjectsInAllIdentityMaps()
          This method will SUM and return the number of objects in all Identity Maps in the session.
 java.lang.Integer getNumberOfObjectsInIdentityMap(java.lang.String className)
          This method is used to return the number of objects in a particular Identity Map
 java.lang.Integer getNumberOfObjectsInIdentityMapSubCache(java.lang.String className)
          This method is used to return the number of objects in a particular Identity Map's subcache.
 java.lang.Integer getNumberOfPersistentClasses()
          This method will answer the number of persistent classes contained in the session.
 java.util.List getObjectsInIdentityMap(java.lang.String className)
          This method will return a collection of the objects in the Identity Map.
 java.util.List getObjectsInIdentityMapSubCacheAsMap(java.lang.String className)
          This method will return a collection of the objects in the Identity Map.
 int getProfileWeight()
          Return the DMS sensor weight
 java.lang.String getProfilingType()
          This method is used to get the type of profiling.
 int getSequencePreallocationSize()
          Method returns the value of the Sequence Preallocation size
 java.lang.String getSessionName()
          Answer the name of the EclipseLink session this MBean represents.
 java.lang.String getSessionType()
          Answer the type of the EclipseLink session this MBean represents.
 boolean getShouldCacheAllStatements()
          Returns if statements should be cached or not
 boolean getShouldLogMessages()
          This method is used to determine if messages should be logged by the session
 boolean getShouldLogPerformanceProfiler()
          This method is used to determine if we should be logging when using the Performance Profiler
 boolean getShouldProfilePerformance()
          This method will return if profiling is turned on or not
 java.util.List getSizeForPool(java.lang.String poolName)
          This method will retrieve the size of a particular connection pool
 int getStatementCacheSize()
          Returns the statement cache size.
 java.lang.Integer getStringBindingSize()
          Return the size of strings after which will be bound into the statement If we are not using a DatabaseLogin, or we're not using string binding, answer 0 (zero).
 java.lang.Long getTimeConnectionEstablished()
          This method will return a long indicating the exact time in Milliseconds that the session connected to the database.
 java.lang.Boolean getUsesByteArrayBinding()
          Shows if Byte Array Binding is turned on or not
 java.lang.Boolean getUsesEclipseLinkProfiling()
          This method answers true if EclipseLink Performance Profiling is on.
 java.lang.Boolean getUsesJDBCBatchWriting()
          This method will return if batchWriting is in use or not.
 java.lang.Boolean getUsesNativeSQL()
          Shows if native SQL is being used
 java.lang.Boolean getUsesStreamsForBinding()
          This method indicates if streams are being used for binding
 java.lang.Boolean getUsesStringBinding()
          This method indicates if Strings are being bound
 void initializeIdentityMaps(java.lang.String[] classNames)
          This method is used to initialize the identity maps specified by the Vector of classNames.
 void invalidateAllIdentityMaps()
          This method is used to invalidate the identity maps in the session.
 void invalidateIdentityMap(java.lang.String className)
          This method is used to invalidate the identity maps specified by className.
 void invalidateIdentityMap(java.lang.String className, java.lang.Boolean recurse)
          This method is used to invalidate the identity maps specified by className.
 void invalidateIdentityMaps(java.lang.String[] classNamesParam, java.lang.Boolean recurse)
          This method is used to invalidate the identity maps specified by the String[] of classNames.
 boolean isJPASession()
          Return whether this session is an EclipseLink JPA session.
 void printAllIdentityMapTypes()
          This method will log the types of Identity Maps in the session.
 void printAvailableConnectionPools()
          This method will print the available Connection pools to the SessionLog.
 void printClassesInSession()
          This method is used to output those Class Names that have identity Maps in the Session.
 void printIdentityMapLocks()
          This method will log the instance level locks in all Identity Maps in the session.
 void printIdentityMapLocks(java.lang.String registeredClassName)
          This method will log the instance level locks in the Identity Map for the given class in the session.
 void printObjectsInIdentityMap(java.lang.String className)
          This method will log the objects in the Identity Map.
 void printObjectsInIdentityMaps()
          This method will log all objects in all Identity Maps in the session.
 void printProfileSummary()
          This method assumes EclipseLink Profiling (as opposed to Java profiling).
 void printProfileSummaryByClass()
          This method assumes EclipseLink Profiling (as opposed to Java profiling).
 void printProfileSummaryByQuery()
          This method assumes EclipseLink Profiling (as opposed to Java profiling).
 void resetAllConnections()
          This method is used to reset connections from the session to the database.
 void setCurrentEclipseLinkLogLevel(java.lang.String newLevel)
          Set the EclipseLink log level to be used at runtime.
 void setProfileWeight(int size)
          Set the DMS sensor weight
 void setProfilingType(java.lang.String profileType)
          This method is used to select the type of profiling.
 void setSequencePreallocationSize(int size)
          This method provides access for setting the sequence pre-allocation size
 void setShouldCacheAllStatements(boolean shouldCacheAllStatements)
          Method used to set if statements should be cached.
 void setShouldLogPerformanceProfiler(boolean shouldLogPerformanceProfiler)
          This method is used to turn on Profile logging when using the Performance Profiler
 void setShouldProfilePerformance(boolean shouldProfile)
          This method is used to turn on Performance Profiling
 void setStatementCacheSize(int size)
          Used to set the statement cache size.
 void setUseEclipseLinkProfiling()
          This method is used to turn on EclipseLink Performance Profiling
 void setUseNoProfiling()
          This method is used to turn off all Performance Profiling, DMS or EclipseLink.
 void updatePoolSize(java.lang.String poolName, int maxSize, int minSize)
          This method allows the client to set the pool size for a particular pool, based on the pool name
 

Method Detail

getShouldLogMessages

boolean getShouldLogMessages()
This method is used to determine if messages should be logged by the session


setShouldProfilePerformance

void setShouldProfilePerformance(boolean shouldProfile)
This method is used to turn on Performance Profiling


getShouldProfilePerformance

boolean getShouldProfilePerformance()
This method will return if profiling is turned on or not


setShouldLogPerformanceProfiler

void setShouldLogPerformanceProfiler(boolean shouldLogPerformanceProfiler)
This method is used to turn on Profile logging when using the Performance Profiler


getShouldLogPerformanceProfiler

boolean getShouldLogPerformanceProfiler()
This method is used to determine if we should be logging when using the Performance Profiler

Returns:

setShouldCacheAllStatements

void setShouldCacheAllStatements(boolean shouldCacheAllStatements)
Method used to set if statements should be cached. Please note that Statements can not be cached when using an external connection pool


getShouldCacheAllStatements

boolean getShouldCacheAllStatements()
Returns if statements should be cached or not


setStatementCacheSize

void setStatementCacheSize(int size)
Used to set the statement cache size. This is only valid if using cached Statements


getStatementCacheSize

int getStatementCacheSize()
Returns the statement cache size. Only valid if statements are being cached


setSequencePreallocationSize

void setSequencePreallocationSize(int size)
This method provides access for setting the sequence pre-allocation size


getSequencePreallocationSize

int getSequencePreallocationSize()
Method returns the value of the Sequence Preallocation size


updatePoolSize

void updatePoolSize(java.lang.String poolName,
                    int maxSize,
                    int minSize)
This method allows the client to set the pool size for a particular pool, based on the pool name


getAvailableConnectionPools

java.util.List getAvailableConnectionPools()
This method will return the available Connection pools within this Server Session


getSizeForPool

java.util.List getSizeForPool(java.lang.String poolName)
This method will retrieve the size of a particular connection pool


addNewConnectionPool

void addNewConnectionPool(java.lang.String poolName,
                          int maxSize,
                          int minSize,
                          java.lang.String platform,
                          java.lang.String driverClassName,
                          java.lang.String url,
                          java.lang.String userName,
                          java.lang.String password)
                          throws java.lang.ClassNotFoundException
This method provides client with access to add a new connection pool to a TopLink ServerSession. This method throws classNotFound Exception if any of the class names are misspelled.

Throws:
java.lang.ClassNotFoundException

resetAllConnections

void resetAllConnections()
This method is used to reset connections from the session to the database. Please Note that this will not work with a SessionBroker at this time


getClassesInSession

java.util.List getClassesInSession()
This method is used to return those Class Names that have identity Maps in the Session. Please note that SubClasses and aggregates will be missing from this list as they do not have separate identity maps.


getObjectsInIdentityMap

java.util.List getObjectsInIdentityMap(java.lang.String className)
                                       throws java.lang.ClassNotFoundException
This method will return a collection of the objects in the Identity Map. There is no particular order to these objects.

Throws:
java.lang.ClassNotFoundException

getNumberOfObjectsInIdentityMap

java.lang.Integer getNumberOfObjectsInIdentityMap(java.lang.String className)
                                                  throws java.lang.ClassNotFoundException
This method is used to return the number of objects in a particular Identity Map

Parameters:
className - the fully qualified name of the class to get number of instances of.
Throws:
If - ClassNotFoundException is thrown then the IdentityMap for that class name could not be found
java.lang.ClassNotFoundException

getObjectsInIdentityMapSubCacheAsMap

java.util.List getObjectsInIdentityMapSubCacheAsMap(java.lang.String className)
                                                    throws java.lang.ClassNotFoundException
This method will return a collection of the objects in the Identity Map. There is no particular order to these objects. These objects are returned as a Map which is how they are stored on the cache. This method replaces getObjectsInIdentityMapSubCache(String className) which returned a List.

Throws:
java.lang.ClassNotFoundException

getNumberOfObjectsInIdentityMapSubCache

java.lang.Integer getNumberOfObjectsInIdentityMapSubCache(java.lang.String className)
                                                          throws java.lang.ClassNotFoundException
This method is used to return the number of objects in a particular Identity Map's subcache. Only works for those identity Maps with a sub cache (IE Hard Cache Weak Identity Map) If ClassNotFoundException is thrown then the IdenityMap for that class name could not be found

Throws:
java.lang.ClassNotFoundException

getProfileWeight

int getProfileWeight()
Return the DMS sensor weight

Returns:

setProfileWeight

void setProfileWeight(int size)
Set the DMS sensor weight


getDeployedEclipseLinkLogLevel

java.lang.String getDeployedEclipseLinkLogLevel()
Answer the EclipseLink log level at deployment time. This is read-only.


getCurrentEclipseLinkLogLevel

java.lang.String getCurrentEclipseLinkLogLevel()
Answer the EclipseLink log level that is changeable. This does not affect the log level in the project (i.e. The next time the application is deployed, changes are forgotten)


setCurrentEclipseLinkLogLevel

void setCurrentEclipseLinkLogLevel(java.lang.String newLevel)
Set the EclipseLink log level to be used at runtime. This does not affect the log level in the project (i.e. The next time the application is deployed, changes are forgotten)

Parameters:
String - newLevel: new log level

getSessionName

java.lang.String getSessionName()
Answer the name of the EclipseLink session this MBean represents.


isJPASession

boolean isJPASession()
Return whether this session is an EclipseLink JPA session. The absence of this function or a value of false will signify that the session belongs to a provider other than EclipseLink.

Returns:

getSessionType

java.lang.String getSessionType()
Answer the type of the EclipseLink session this MBean represents. Types include: "ServerSession", "DatabaseSession", "SessionBroker"


getClassSummaryDetailsUsingFilter

java.lang.Object[][] getClassSummaryDetailsUsingFilter(java.lang.String filter)
Provide an instance of 2 Dimensional Array simulating tabular format information about all classes in the session whose class names match the provided filter. The 2 Dimensional array contains each item with values being row object array. Each row object array represents EclipseLink class details info with respect to below attributes: ["Class Name", "Parent Class Name", "Cache Type", "Configured Size", "Current Size"]


getClassSummaryDetails

java.lang.Object[][] getClassSummaryDetails()
Provide an instance of 2 Dimensional Array simulating tabular format information about all classes in the session. The 2 Dimensional array contains each item with values being row object array. Each row object array represents EclipseLink class details info with respect to below attributes: ["Class Name", "Parent Class Name", "Cache Type", "Configured Size", "Current Size"]


getClassSummaryDetailsUsingFilterArray

java.util.List<ClassSummaryDetailBase> getClassSummaryDetailsUsingFilterArray(java.lang.String filter)
Provide a list of instance of ClassSummaryDetail containing information about the classes in the session whose class names match the provided filter. ClassSummaryDetail is a model specific class that can be used internally by the Portable JMX Framework to convert class attribute to JMX required open type, it has:- 1. model specific type that needs to be converted : ["Class Name", "Parent Class Name", "Cache Type", "Configured Size", "Current Size"] 2. convert methods.

Parameters:
filter - A comma separated list of strings to match against.
Returns:
A ArrayList of instance of ClassSummaryDetail containing class information for the class names that match the filter.

getClassSummaryDetailsArray

java.util.List<ClassSummaryDetailBase> getClassSummaryDetailsArray()
Provide a list of instance of ClassSummaryDetail containing information about all classes in the session. ClassSummaryDetail is a model specific class that can be used internally by the Portable JMX Framework to convert class attribute to JMX required open type, it has:- 1. model specific type that needs to be converted : ["Class Name", "Parent Class Name", "Cache Type", "Configured Size", "Current Size"] 2. convert methods.

Returns:
A ArrayList of instance of ClassSummaryDetail containing class information for the class names that match the filter.

getMappedClassNamesUsingFilter

java.util.Vector getMappedClassNamesUsingFilter(java.lang.String filter)
INTERNAL: This method traverses the EclipseLink descriptors and returns a Vector of the descriptor's reference class names that match the provided filter. The filter is a comma separated list of strings to match against.

Parameters:
filter - A comma separated list of strings to match against.
Returns:
A Vector of class names that match the filter.

getModuleName

java.lang.String getModuleName()
getModuleName(): Answer the name of the context-root of the application that this session is associated with. Answer "unknown" if there is no module name available. Default behavior is to return "unknown" - we override this behavior here for WebLogic.


getApplicationName

java.lang.String getApplicationName()
getApplicationName(): Answer the name of the module (EAR name) that this session is associated with. Answer "unknown" if there is no application name available. Default behavior is to return "unknown" - we override this behavior here for WebLogic.


getProfilingType

java.lang.String getProfilingType()
This method is used to get the type of profiling. Possible values are: "EclipseLink" or "None".


setProfilingType

void setProfilingType(java.lang.String profileType)
This method is used to select the type of profiling. Valid values are: "EclipseLink" or "None". These values are not case sensitive. null is considered to be "None".


setUseEclipseLinkProfiling

void setUseEclipseLinkProfiling()
This method is used to turn on EclipseLink Performance Profiling


getUsesEclipseLinkProfiling

java.lang.Boolean getUsesEclipseLinkProfiling()
This method answers true if EclipseLink Performance Profiling is on.


setUseNoProfiling

void setUseNoProfiling()
This method is used to turn off all Performance Profiling, DMS or EclipseLink.


getStringBindingSize

java.lang.Integer getStringBindingSize()
Return the size of strings after which will be bound into the statement If we are not using a DatabaseLogin, or we're not using string binding, answer 0 (zero).


getTimeConnectionEstablished

java.lang.Long getTimeConnectionEstablished()
This method will return a long indicating the exact time in Milliseconds that the session connected to the database.


getUsesJDBCBatchWriting

java.lang.Boolean getUsesJDBCBatchWriting()
This method will return if batchWriting is in use or not.


getUsesByteArrayBinding

java.lang.Boolean getUsesByteArrayBinding()
Shows if Byte Array Binding is turned on or not


getUsesNativeSQL

java.lang.Boolean getUsesNativeSQL()
Shows if native SQL is being used


getUsesStreamsForBinding

java.lang.Boolean getUsesStreamsForBinding()
This method indicates if streams are being used for binding


getUsesStringBinding

java.lang.Boolean getUsesStringBinding()
This method indicates if Strings are being bound


clearStatementCache

void clearStatementCache()
Used to clear the statement cache. Only valid if statements are being cached


printAvailableConnectionPools

void printAvailableConnectionPools()
This method will print the available Connection pools to the SessionLog.


getMaxSizeForPool

java.lang.Integer getMaxSizeForPool(java.lang.String poolName)
This method will retrieve the max size of a particular connection pool

Parameters:
poolName - the name of the pool to get the max size for
Returns:
Integer for the max size of the pool. Return -1 if pool doesn't exist.

getMinSizeForPool

java.lang.Integer getMinSizeForPool(java.lang.String poolName)
This method will retrieve the min size of a particular connection pool

Parameters:
poolName - the name of the pool to get the min size for
Returns:
Integer for the min size of the pool. Return -1 if pool doesn't exist.

printClassesInSession

void printClassesInSession()
This method is used to output those Class Names that have identity Maps in the Session. Please note that SubClasses and aggregates will be missing form this list as they do not have separate identity maps.


printObjectsInIdentityMap

void printObjectsInIdentityMap(java.lang.String className)
                               throws java.lang.ClassNotFoundException
This method will log the objects in the Identity Map. There is no particular order to these objects.

Parameters:
className - the fully qualified classname identifying the identity map
Throws:
thrown - then the IdentityMap for that class name could not be found
java.lang.ClassNotFoundException

printAllIdentityMapTypes

void printAllIdentityMapTypes()
This method will log the types of Identity Maps in the session.


printObjectsInIdentityMaps

void printObjectsInIdentityMaps()
This method will log all objects in all Identity Maps in the session.


getNumberOfObjectsInAllIdentityMaps

java.lang.Integer getNumberOfObjectsInAllIdentityMaps()
This method will SUM and return the number of objects in all Identity Maps in the session.


getNumberOfPersistentClasses

java.lang.Integer getNumberOfPersistentClasses()
This method will answer the number of persistent classes contained in the session. This does not include aggregates.


printIdentityMapLocks

void printIdentityMapLocks()
This method will log the instance level locks in all Identity Maps in the session.


printIdentityMapLocks

void printIdentityMapLocks(java.lang.String registeredClassName)
This method will log the instance level locks in the Identity Map for the given class in the session.


printProfileSummary

void printProfileSummary()
This method assumes EclipseLink Profiling (as opposed to Java profiling). This will log at the INFO level a summary of all elements in the profile.


printProfileSummaryByClass

void printProfileSummaryByClass()
This method assumes EclipseLink Profiling (as opposed to Java profiling). This will log at the INFO level a summary of all elements in the profile, categorized by Class.


printProfileSummaryByQuery

void printProfileSummaryByQuery()
This method assumes EclipseLink Profiling (as opposed to Java profiling). This will log at the INFO level a summary of all elements in the profile, categorized by Query.


getLogType

java.lang.String getLogType()
Return the log type, either "EclipseLink", "Java" or the simple name of the logging class used.

Returns:
the log type

getDatabasePlatform

java.lang.String getDatabasePlatform()
Return the database platform used by the DatabaseSession.

Returns:
String databasePlatform

getJdbcConnectionDetails

java.lang.String getJdbcConnectionDetails()
Return JDBCConnection detail information. This includes URL and datasource information.


getConnectionPoolType

java.lang.String getConnectionPoolType()
Return connection pool type. Values include: "Internal", "External" and "N/A".


getDriver

java.lang.String getDriver()
Return db driver class name. This only applies to DefaultConnector. Return "N/A" otherwise.


getLogFilename

java.lang.String getLogFilename()
Return the log filename. This returns the fully qualified path of the log file when EclipseLink logging is enabled. Null is returned otherwise.

Returns:
String logFilename

initializeIdentityMaps

void initializeIdentityMaps(java.lang.String[] classNames)
                            throws java.lang.ClassNotFoundException
This method is used to initialize the identity maps specified by the Vector of classNames.

Parameters:
classNames - String[] of fully qualified classnames identifying the identity maps to initialize
Throws:
java.lang.ClassNotFoundException

invalidateAllIdentityMaps

void invalidateAllIdentityMaps()
This method is used to invalidate the identity maps in the session.


invalidateIdentityMaps

void invalidateIdentityMaps(java.lang.String[] classNamesParam,
                            java.lang.Boolean recurse)
                            throws java.lang.ClassNotFoundException
This method is used to invalidate the identity maps specified by the String[] of classNames.

Parameters:
classNames - String[] of fully qualified classnames identifying the identity maps to invalidate
recurse - Boolean indicating if we want to invalidate the children identity maps too
Throws:
java.lang.ClassNotFoundException

invalidateIdentityMap

void invalidateIdentityMap(java.lang.String className)
                           throws java.lang.ClassNotFoundException
This method is used to invalidate the identity maps specified by className. This does not invalidate the children identity maps

Parameters:
className - the fully qualified classname identifying the identity map to invalidate
Throws:
java.lang.ClassNotFoundException

invalidateIdentityMap

void invalidateIdentityMap(java.lang.String className,
                           java.lang.Boolean recurse)
                           throws java.lang.ClassNotFoundException
This method is used to invalidate the identity maps specified by className.

Parameters:
className - the fully qualified classname identifying the identity map to invalidate
recurse - Boolean indicating if we want to invalidate the children identity maps too
Throws:
java.lang.ClassNotFoundException

EclipseLink 2.2.0, build 'v20110202-r8913' API Reference