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
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public String | getApplicationName()
getApplicationName(): Answer the name of the module (EAR name) that this session is associated with. |
| public List | getAvailableConnectionPools()
This method will return the available Connection pools within this Server Session |
| public List | getClassesInSession()
This method is used to return those Class Names that have identity Maps in the Session. |
| public Object[][] | getClassSummaryDetails()
Provide an instance of 2 Dimensional Array simulating tabular format information about all classes in the session. |
| public List | Returns: A ArrayList of instance of ClassSummaryDetail containing class information for the class names that match the filter.Provide a list of instance of ClassSummaryDetail containing information about all classes in the session. |
| public Object[][] | getClassSummaryDetailsUsingFilter(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. |
| public List | Returns: A ArrayList of instance of ClassSummaryDetail containing class information for the class names that match the filter.A comma separated list of strings to match against. filter)Provide a list of instance of ClassSummaryDetail containing information about the classes in the session whose class names match the provided filter. |
| public String | |
| public String | |
| public String | Returns: String databasePlatformReturn the database platform used by the DatabaseSession. |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | Returns: the log typeReturn the log type, either "EclipseLink", "Java" or the simple name of the logging class used. |
| public Vector | Returns: A Vector of class names that match the filter.A comma separated list of strings to match against. filter)INTERNAL: This method traverses the EclipseLink descriptors and returns a Vector of the descriptor's reference class names that match the provided filter. |
| public Integer | Returns: Integer for the max size of the pool. Return -1 if pool doesn't exist.the name of the pool to get the max size for poolName)This method will retrieve the max size of a particular connection pool |
| public Integer | Returns: Integer for the min size of the pool. Return -1 if pool doesn't exist.the name of the pool to get the min size for poolName)This method will retrieve the min size of a particular connection pool |
| public String | getModuleName()
getModuleName(): Answer the name of the context-root of the application that this session is associated with. |
| public Integer | getNumberOfObjectsInAllIdentityMaps()
This method will SUM and return the number of objects in all Identity Maps in the session. |
| public Integer | getNumberOfObjectsInIdentityMap(String
the fully qualified name of the class to get number of instances of. className)This method is used to return the number of objects in a particular Identity Map |
| public Integer | getNumberOfObjectsInIdentityMapSubCache(String className)
This method is used to return the number of objects in a particular Identity Map's subcache. |
| public Integer | getNumberOfPersistentClasses()
This method will answer the number of persistent classes contained in the session. |
| public List | getObjectsInIdentityMap(String className)
This method will return a collection of the objects in the Identity Map. |
| public List | getObjectsInIdentityMapSubCacheAsMap(String className)
This method will return a collection of the objects in the Identity Map. |
| public int | |
| public String | |
| public int | |
| public String | |
| public String | |
| public boolean | |
| public boolean | |
| public boolean | getShouldLogPerformanceProfiler()
This method is used to determine if we should be logging when using the Performance Profiler |
| public boolean | |
| public List | |
| public int | |
| public 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). |
| public Long | getTimeConnectionEstablished()
This method will return a long indicating the exact time in Milliseconds that the session connected to the database. |
| public Boolean | |
| public Boolean | |
| public Boolean | |
| public Boolean | |
| public Boolean | |
| public Boolean | |
| public void | initializeIdentityMaps(String[]
String[] of fully qualified classnames identifying the identity maps to initialize classNames)This method is used to initialize the identity maps specified by the Vector of classNames. |
| public void | |
| public void | invalidateIdentityMap(String
the fully qualified classname identifying the identity map to invalidate className)This method is used to invalidate the identity maps specified by className. |
| public void | invalidateIdentityMap(String
the fully qualified classname identifying the identity map to invalidate className, Boolean Boolean indicating if we want to invalidate the children identity maps too recurse)This method is used to invalidate the identity maps specified by className. |
| public void | invalidateIdentityMaps(String[]
String[] of fully qualified classnames identifying the identity maps to invalidate classNamesParam, Boolean Boolean indicating if we want to invalidate the children identity maps too recurse)This method is used to invalidate the identity maps specified by the String[] of classNames. |
| public boolean | |
| public void | |
| public void | printAvailableConnectionPools()
This method will print the available Connection pools to the SessionLog. |
| public void | printClassesInSession()
This method is used to output those Class Names that have identity Maps in the Session. |
| public void | printIdentityMapLocks()
This method will log the instance level locks in all Identity Maps in the session. |
| public void | printIdentityMapLocks(String registeredClassName)
This method will log the instance level locks in the Identity Map for the given class in the session. |
| public void | printObjectsInIdentityMap(String
the fully qualified classname identifying the identity map className)This method will log the objects in the Identity Map. |
| public void | |
| public void | |
| public void | printProfileSummaryByClass()
This method assumes EclipseLink Profiling (as opposed to Java profiling). |
| public void | printProfileSummaryByQuery()
This method assumes EclipseLink Profiling (as opposed to Java profiling). |
| public void | |
| public void | setCurrentEclipseLinkLogLevel(String
new log level newLevel)Set the EclipseLink log level to be used at runtime. |
| public void | |
| public void | |
| public void | setSequencePreallocationSize(int size)
This method provides access for setting the sequence pre-allocation size |
| public void | setShouldCacheAllStatements(boolean shouldCacheAllStatements)
Method used to set if statements should be cached. |
| public void | setShouldLogPerformanceProfiler(boolean shouldLogPerformanceProfiler)
This method is used to turn on Profile logging when using the Performance Profiler |
| public void | setShouldProfilePerformance(boolean shouldProfile)
This method is used to turn on Performance Profiling |
| public void | |
| public void | |
| public void | |
| public void | updatePoolSize(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 |
| addNewConnectionPool | back to summary |
|---|---|
| public void addNewConnectionPool(String poolName, int maxSize, int minSize, String platform, String driverClassName, String url, String userName, String password) throws 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. | |
| clearStatementCache | back to summary |
|---|---|
| public void clearStatementCache() Used to clear the statement cache. Only valid if statements are being cached | |
| getApplicationName | back to summary |
|---|---|
| public 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. | |
| getAvailableConnectionPools | back to summary |
|---|---|
| public List This method will return the available Connection pools within this Server Session | |
| getClassesInSession | back to summary |
|---|---|
| public List 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. | |
| getClassSummaryDetails | back to summary |
|---|---|
| public 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"] | |
| getClassSummaryDetailsArray | back to summary |
|---|---|
| public List 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.
| |
| getClassSummaryDetailsUsingFilter | back to summary |
|---|---|
| public Object[][] getClassSummaryDetailsUsingFilter(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"] | |
| getClassSummaryDetailsUsingFilterArray | back to summary |
|---|---|
| public List 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.
| |
| getConnectionPoolType | back to summary |
|---|---|
| public String getConnectionPoolType() Return connection pool type. Values include: "Internal", "External" and "N/A". | |
| getCurrentEclipseLinkLogLevel | back to summary |
|---|---|
| public 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) | |
| getDatabasePlatform | back to summary |
|---|---|
| public String getDatabasePlatform() Return the database platform used by the DatabaseSession.
| |
| getDeployedEclipseLinkLogLevel | back to summary |
|---|---|
| public String getDeployedEclipseLinkLogLevel() Answer the EclipseLink log level at deployment time. This is read-only. | |
| getDriver | back to summary |
|---|---|
| public String getDriver() Return db driver class name. This only applies to DefaultConnector. Return "N/A" otherwise. | |
| getJdbcConnectionDetails | back to summary |
|---|---|
| public String getJdbcConnectionDetails() Return JDBCConnection detail information. This includes URL and datasource information. | |
| getLogFilename | back to summary |
|---|---|
| public 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.
| |
| getLogType | back to summary |
|---|---|
| public String getLogType() Return the log type, either "EclipseLink", "Java" or the simple name of the logging class used.
| |
| getMappedClassNamesUsingFilter | back to summary |
|---|---|
| public Vector 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. | |
| getMaxSizeForPool | back to summary |
|---|---|
| public Integer getMaxSizeForPool(String poolName) This method will retrieve the max size of a particular connection pool | |
| getMinSizeForPool | back to summary |
|---|---|
| public Integer getMinSizeForPool(String poolName) This method will retrieve the min size of a particular connection pool | |
| getModuleName | back to summary |
|---|---|
| public 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. | |
| getNumberOfObjectsInAllIdentityMaps | back to summary |
|---|---|
| public Integer getNumberOfObjectsInAllIdentityMaps() This method will SUM and return the number of objects in all Identity Maps in the session. | |
| getNumberOfObjectsInIdentityMap | back to summary |
|---|---|
| public Integer getNumberOfObjectsInIdentityMap(String className) throws ClassNotFoundException This method is used to return the number of objects in a particular Identity Map
| |
| getNumberOfObjectsInIdentityMapSubCache | back to summary |
|---|---|
| public Integer getNumberOfObjectsInIdentityMapSubCache(String className) throws 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 | |
| getNumberOfPersistentClasses | back to summary |
|---|---|
| public Integer getNumberOfPersistentClasses() This method will answer the number of persistent classes contained in the session. This does not include aggregates. | |
| getObjectsInIdentityMap | back to summary |
|---|---|
| public List This method will return a collection of the objects in the Identity Map. There is no particular order to these objects. | |
| getObjectsInIdentityMapSubCacheAsMap | back to summary |
|---|---|
| public List 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. | |
| getProfileWeight | back to summary |
|---|---|
| public int getProfileWeight() Return the DMS sensor weight | |
| getProfilingType | back to summary |
|---|---|
| public String getProfilingType() This method is used to get the type of profiling. Possible values are: "EclipseLink" or "None". | |
| getSequencePreallocationSize | back to summary |
|---|---|
| public int getSequencePreallocationSize() Method returns the value of the Sequence Preallocation size | |
| getSessionName | back to summary |
|---|---|
| public String getSessionName() Answer the name of the EclipseLink session this MBean represents. | |
| getSessionType | back to summary |
|---|---|
| public String getSessionType() Answer the type of the EclipseLink session this MBean represents. Types include: "ServerSession", "DatabaseSession", "SessionBroker" | |
| getShouldCacheAllStatements | back to summary |
|---|---|
| public boolean getShouldCacheAllStatements() Returns if statements should be cached or not | |
| getShouldLogMessages | back to summary |
|---|---|
| public boolean getShouldLogMessages() This method is used to determine if messages should be logged by the session | |
| getShouldLogPerformanceProfiler | back to summary |
|---|---|
| public boolean getShouldLogPerformanceProfiler() This method is used to determine if we should be logging when using the Performance Profiler | |
| getShouldProfilePerformance | back to summary |
|---|---|
| public boolean getShouldProfilePerformance() This method will return if profiling is turned on or not | |
| getSizeForPool | back to summary |
|---|---|
| public List This method will retrieve the size of a particular connection pool | |
| getStatementCacheSize | back to summary |
|---|---|
| public int getStatementCacheSize() Returns the statement cache size. Only valid if statements are being cached | |
| getStringBindingSize | back to summary |
|---|---|
| public 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 | back to summary |
|---|---|
| public Long getTimeConnectionEstablished() This method will return a long indicating the exact time in Milliseconds that the session connected to the database. | |
| getUsesByteArrayBinding | back to summary |
|---|---|
| public Boolean getUsesByteArrayBinding() Shows if Byte Array Binding is turned on or not | |
| getUsesEclipseLinkProfiling | back to summary |
|---|---|
| public Boolean getUsesEclipseLinkProfiling() This method answers true if EclipseLink Performance Profiling is on. | |
| getUsesJDBCBatchWriting | back to summary |
|---|---|
| public Boolean getUsesJDBCBatchWriting() This method will return if batchWriting is in use or not. | |
| getUsesNativeSQL | back to summary |
|---|---|
| public Boolean getUsesNativeSQL() Shows if native SQL is being used | |
| getUsesStreamsForBinding | back to summary |
|---|---|
| public Boolean getUsesStreamsForBinding() This method indicates if streams are being used for binding | |
| getUsesStringBinding | back to summary |
|---|---|
| public Boolean getUsesStringBinding() This method indicates if Strings are being bound | |
| initializeIdentityMaps | back to summary |
|---|---|
| public void initializeIdentityMaps(String[] classNames) throws ClassNotFoundException This method is used to initialize the identity maps specified by the Vector of classNames.
| |
| invalidateAllIdentityMaps | back to summary |
|---|---|
| public void invalidateAllIdentityMaps() This method is used to invalidate the identity maps in the session. | |
| invalidateIdentityMap | back to summary |
|---|---|
| public void invalidateIdentityMap(String className) throws ClassNotFoundException This method is used to invalidate the identity maps specified by className. This does not invalidate the children identity maps
| |
| invalidateIdentityMap | back to summary |
|---|---|
| public void invalidateIdentityMap(String className, Boolean recurse) throws ClassNotFoundException This method is used to invalidate the identity maps specified by className. | |
| invalidateIdentityMaps | back to summary |
|---|---|
| public void invalidateIdentityMaps(String[] classNamesParam, Boolean recurse) throws ClassNotFoundException This method is used to invalidate the identity maps specified by the String[] of classNames. | |
| isJPASession | back to summary |
|---|---|
| public 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. | |
| printAllIdentityMapTypes | back to summary |
|---|---|
| public void printAllIdentityMapTypes() This method will log the types of Identity Maps in the session. | |
| printAvailableConnectionPools | back to summary |
|---|---|
| public void printAvailableConnectionPools() This method will print the available Connection pools to the SessionLog. | |
| printClassesInSession | back to summary |
|---|---|
| public 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. | |
| printIdentityMapLocks | back to summary |
|---|---|
| public void printIdentityMapLocks() This method will log the instance level locks in all Identity Maps in the session. | |
| printIdentityMapLocks | back to summary |
|---|---|
| public void printIdentityMapLocks(String registeredClassName) This method will log the instance level locks in the Identity Map for the given class in the session. | |
| printObjectsInIdentityMap | back to summary |
|---|---|
| public void printObjectsInIdentityMap(String className) throws ClassNotFoundException This method will log the objects in the Identity Map. There is no particular order to these objects.
| |
| printObjectsInIdentityMaps | back to summary |
|---|---|
| public void printObjectsInIdentityMaps() This method will log all objects in all Identity Maps in the session. | |
| printProfileSummary | back to summary |
|---|---|
| public 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 | back to summary |
|---|---|
| public 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 | back to summary |
|---|---|
| public 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. | |
| resetAllConnections | back to summary |
|---|---|
| public 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 | |
| setCurrentEclipseLinkLogLevel | back to summary |
|---|---|
| public void setCurrentEclipseLinkLogLevel(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)
| |
| setProfileWeight | back to summary |
|---|---|
| public void setProfileWeight(int size) Set the DMS sensor weight | |
| setProfilingType | back to summary |
|---|---|
| public void setProfilingType(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". | |
| setSequencePreallocationSize | back to summary |
|---|---|
| public void setSequencePreallocationSize(int size) This method provides access for setting the sequence pre-allocation size | |
| setShouldCacheAllStatements | back to summary |
|---|---|
| public 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 | |
| setShouldLogPerformanceProfiler | back to summary |
|---|---|
| public void setShouldLogPerformanceProfiler(boolean shouldLogPerformanceProfiler) This method is used to turn on Profile logging when using the Performance Profiler | |
| setShouldProfilePerformance | back to summary |
|---|---|
| public void setShouldProfilePerformance(boolean shouldProfile) This method is used to turn on Performance Profiling | |
| setStatementCacheSize | back to summary |
|---|---|
| public void setStatementCacheSize(int size) Used to set the statement cache size. This is only valid if using cached Statements | |
| setUseEclipseLinkProfiling | back to summary |
|---|---|
| public void setUseEclipseLinkProfiling() This method is used to turn on EclipseLink Performance Profiling | |
| setUseNoProfiling | back to summary |
|---|---|
| public void setUseNoProfiling() This method is used to turn off all Performance Profiling, DMS or EclipseLink. | |
| updatePoolSize | back to summary |
|---|---|
| public void updatePoolSize(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 | |