Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-02


oracle.toplink.services.weblogic
Class WebLogicRuntimeServices

java.lang.Object
  extended by oracle.toplink.services.RuntimeServices
      extended by oracle.toplink.services.weblogic.WebLogicRuntimeServices

Direct Known Subclasses:
MBeanWebLogicRuntimeServices

public class WebLogicRuntimeServices
extends RuntimeServices

Purpose: Provide a dynamic interface into the TopLink Session.

Description: This class is meant to provide facilities for managing an TopLink session external to TopLink over JMX.


Field Summary
 java.lang.String objectName
           

 

Constructor Summary
WebLogicRuntimeServices()
          Default Constructor
WebLogicRuntimeServices(oracle.toplink.internal.sessions.AbstractSession session)
          Create an instance of WebLogicRuntimeServices to be associated with the provided session
WebLogicRuntimeServices(java.util.Locale locale)
          Create an instance of WebLogicRuntimeServices to be associated with the provided locale The user must call setSession(Session) afterwards to define the session.

 

Method Summary
 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.lang.Object[][] getClassSummaryDetails()
          Provide an instance of 2 Dimensional Array simulating tabular format information about all classes in the session.
 java.util.ArrayList<ClassSummaryDetail> 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.ArrayList<ClassSummaryDetail> 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 getCurrentTopLinkLogLevel()
          Answer the TopLink log level that is changeable.
 java.lang.String getCurrentTopLinkLogLevel(java.lang.String category)
          Answer the TopLink log level that is changeable, given the passed category.
 java.lang.String getDatabasePlatform()
          Return the database platform used by the DatabaseSession.
 java.lang.String getDeployedTopLinkLogLevel()
          Answer the TopLink log level at deployment time.
 java.lang.String getDeployedTopLinkLogLevel(java.lang.String category)
          Answer the TopLink log level at deployment time for the given category.
 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 "TopLink", "Java" or "Server"
 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 getNumberOfPersistentClasses()
          This method will answer the number of persistent classes contained in the session.
 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 TopLink session this MBean represents.
 java.lang.String getSessionType()
          Answer the type of the TopLink session this MBean represents.
 java.lang.Boolean getShouldBindAllParameters()
          Method returns if all Parameters should be bound or not
 boolean getShouldCacheAllStatements()
          Returns if statements should be cached or not
 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 getUsesBatchWriting()
          This method will return if batchWriting is in use or not.
 java.lang.Boolean getUsesByteArrayBinding()
          Shows if Byte Array Binding is turned on or not
 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
 java.lang.Boolean getUsesTopLinkProfiling()
          This method answers true if TopLink Performance Profiling is on.
 void initializeAllIdentityMaps()
          This method is used to initialize the identity maps in the session.
 void initializeIdentityMap(java.lang.String className)
          This method is used to initialize the identity maps specified by className.
 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 a 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 TopLink Profiling (as opposed to Java profiling).
 void printProfileSummaryByClass()
          This method assumes TopLink Profiling (as opposed to Java profiling).
 void printProfileSummaryByQuery()
          This method assumes TopLink Profiling (as opposed to Java profiling).
 void resetAllConnections()
          This method is used to reset connections from the session to the database.
 void setCurrentTopLinkLogLevel(java.lang.String newLevel)
          Set the TopLink log level to be used at runtime.
 void setProfilingType(java.lang.String profileType)
          This method is used to select the type of profiling.
 void setUseNoProfiling()
          This method is used to turn off all Performance Profiling, DMS or TopLink.
 void setUseTopLinkProfiling()
          This method is used to turn on TopLink Performance Profiling

 

Methods inherited from class oracle.toplink.services.RuntimeServices
addNewConnectionPool, addNewConnectionPool, getAvailableConnectionPools, getClassesInSession, getLogLevel, getNumberOfObjectsInIdentityMapSubCache, getObjectsInIdentityMap, getObjectsInIdentityMapSubCache, getObjectsInIdentityMapSubCacheAsMap, getShouldLogDebug, getShouldLogExceptions, getShouldLogExceptionStackTrace, getShouldLogMessages, getShouldLogPerformanceProfiler, getShouldPrintConnection, getShouldPrintDate, getShouldPrintSession, getShouldPrintThread, getShouldProfilePerformance, getSizeForPool, setLogLevel, setProfileWeight, setSequencePreallocationSize, setShouldCacheAllStatements, setShouldLogDebug, setShouldLogExceptions, setShouldLogExceptionStackTrace, setShouldLogMessages, setShouldLogPerformanceProfiler, setShouldPrintConnection, setShouldPrintDate, setShouldPrintSession, setShouldPrintThread, setShouldProfilePerformance, setStatementCacheSize, shouldLog, updatePoolSize

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

objectName

public java.lang.String objectName

Constructor Detail

WebLogicRuntimeServices

public WebLogicRuntimeServices()
Default Constructor

WebLogicRuntimeServices

public WebLogicRuntimeServices(oracle.toplink.internal.sessions.AbstractSession session)
Create an instance of WebLogicRuntimeServices to be associated with the provided session
Parameters:
session - The session to be used with these RuntimeServices
String - myBaseObjectName: "weblogic:....." (The JMX object name before it's wrapped in a ObjectName)

WebLogicRuntimeServices

public WebLogicRuntimeServices(java.util.Locale locale)
Create an instance of WebLogicRuntimeServices to be associated with the provided locale The user must call setSession(Session) afterwards to define the session.

Method Detail

getSessionName

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

getSessionType

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

getClassSummaryDetailsUsingFilter

public 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 TopLink class details info with respect to below attributes: ["Class Name", "Parent Class Name", "Cache Type", "Configured Size", "Current Size"]

getClassSummaryDetailsUsingFilterArray

public java.util.ArrayList<ClassSummaryDetail> 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

public java.util.ArrayList<ClassSummaryDetail> 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.

getClassSummaryDetails

public 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 TopLink class details info with respect to below attributes: ["Class Name", "Parent Class Name", "Cache Type", "Configured Size", "Current Size"]

getModuleName

public 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

public 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.

getDeployedTopLinkLogLevel

public java.lang.String getDeployedTopLinkLogLevel()
Answer the TopLink log level at deployment time. This is read-only.

getDeployedTopLinkLogLevel

public java.lang.String getDeployedTopLinkLogLevel(java.lang.String category)
Answer the TopLink log level at deployment time for the given category. This is read-only.
Parameters:
String - category: category of log level desired

getCurrentTopLinkLogLevel

public java.lang.String getCurrentTopLinkLogLevel()
Answer the TopLink 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)

getCurrentTopLinkLogLevel

public java.lang.String getCurrentTopLinkLogLevel(java.lang.String category)
Answer the TopLink log level that is changeable, given the passed category. This does not affect the log level in the project (i.e. The next time the application is deployed, changes are forgotten)
Parameters:
String - category: category for level

setCurrentTopLinkLogLevel

public void setCurrentTopLinkLogLevel(java.lang.String newLevel)
Set the TopLink 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

getProfilingType

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

setProfilingType

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

setUseTopLinkProfiling

public void setUseTopLinkProfiling()
This method is used to turn on TopLink Performance Profiling

getUsesTopLinkProfiling

public java.lang.Boolean getUsesTopLinkProfiling()
This method answers true if TopLink Performance Profiling is on.

setUseNoProfiling

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

getShouldBindAllParameters

public java.lang.Boolean getShouldBindAllParameters()
Method returns if all Parameters should be bound or not

getStringBindingSize

public 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).

getUsesBatchWriting

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

getTimeConnectionEstablished

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

getUsesJDBCBatchWriting

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

getUsesByteArrayBinding

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

getUsesNativeSQL

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

getUsesStreamsForBinding

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

getUsesStringBinding

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

getShouldCacheAllStatements

public boolean getShouldCacheAllStatements()
Returns if statements should be cached or not
Overrides:
getShouldCacheAllStatements in class RuntimeServices

getStatementCacheSize

public int getStatementCacheSize()
Returns the statement cache size. Only valid if statements are being cached
Overrides:
getStatementCacheSize in class RuntimeServices

clearStatementCache

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

getSequencePreallocationSize

public int getSequencePreallocationSize()
Method returns the value of the Sequence Preallocation size
Overrides:
getSequencePreallocationSize in class RuntimeServices

printAvailableConnectionPools

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

getMaxSizeForPool

public 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

public 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.

resetAllConnections

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
Overrides:
resetAllConnections in class RuntimeServices

printClassesInSession

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.

printObjectsInIdentityMap

public 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

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

printObjectsInIdentityMaps

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

getNumberOfObjectsInIdentityMap

public 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
Overrides:
getNumberOfObjectsInIdentityMap in class RuntimeServices
Parameters:
className - the fully qualified name of the class to get number of instances of.
Throws:
thrown - then the IdentityMap for that class name could not be found
java.lang.ClassNotFoundException

getNumberOfObjectsInAllIdentityMaps

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

getNumberOfPersistentClasses

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

printIdentityMapLocks

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

printIdentityMapLocks

public 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

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

printProfileSummaryByClass

public void printProfileSummaryByClass()
This method assumes TopLink 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

public void printProfileSummaryByQuery()
This method assumes TopLink 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

public java.lang.String getLogType()
Return the log type, either "TopLink", "Java" or "Server"
Returns:
the log type

getDatabasePlatform

public java.lang.String getDatabasePlatform()
Return the database platform used by the DatabaseSession.
Returns:
String databasePlatform

getJdbcConnectionDetails

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

getConnectionPoolType

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

getDriver

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

getLogFilename

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

initializeAllIdentityMaps

public void initializeAllIdentityMaps()
This method is used to initialize the identity maps in the session.

initializeIdentityMaps

public 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

initializeIdentityMap

public void initializeIdentityMap(java.lang.String className)
                           throws java.lang.ClassNotFoundException
This method is used to initialize the identity maps specified by className.
Parameters:
className - the fully qualified classnames identifying the identity map to initialize
Throws:
java.lang.ClassNotFoundException

invalidateAllIdentityMaps

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

invalidateIdentityMaps

public 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

public 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

public 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

isJPASession

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

Skip navigation links

Copyright © 1998, 2009, Oracle. All Rights Reserved.