Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.remote
Class ProxySession

java.lang.Object
  extended byoracle.toplink.publicinterface.Session
      extended byoracle.toplink.remote.DistributedSession
          extended byoracle.toplink.remote.ProxySession

All Implemented Interfaces:
java.lang.Cloneable, CommandProcessor, java.io.Serializable, Session

public class ProxySession
extends DistributedSession

OBSOLETE: Purpose: Provide transparent remote three-tiered replacation support. The proxy session allows for complex three-tiered applications to be easily built. It is similar to the remote session but does not do any client side processing. All call are forwarded to the server, no caching or units of work can be done locally, and object identity is not maintained. Normally the remote session is preffered to the proxy session, however in some cases a very light session that has little functionality is desired.

This session is a primary interface which resides on the client side. Users would interact with session just the same way as if it was a normal session.

See Also:
Serialized Form

Field Summary

Fields inherited from interface oracle.toplink.remotecommand.CommandProcessor
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING

Constructor Summary
ProxySession(oracle.toplink.internal.remote.RemoteConnection remoteConnection)
Deprecated. PUBLIC: Creates a ProxySession.

Method Summary
oracle.toplink.publicinterface.UnitOfWork acquireUnitOfWork()
Deprecated. PUBLIC: Return a unit of work for this session.
boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject)
Deprecated. TESTING: Return if the two objects match completely.
boolean compareObjectsDontMatch(java.lang.Object firstObject, java.lang.Object secondObject)
Deprecated. TESTING: Return true if two objects do not match.
boolean containsObjectInIdentityMap(java.lang.Object domainObject)
Deprecated. ADVANCED: Return if the domain object is in the identity map
boolean containsObjectInIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
Deprecated. ADVANCED: Return if the domain object (the instance of a class with primary key) is in the identity map
java.lang.Object executeQuery(DatabaseQuery query)
Deprecated. PUBLIC: Execute the database query.
ExceptionHandler getExceptionHandler()
Deprecated. PUBLIC: Return a ExceptionHandler.
java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
Deprecated. ADVANCED: Return the object from the identity with the given object.
java.lang.Object getFromIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
Deprecated. ADVANCED: Return the object from the identity with the primary key and class.
DatabaseLogin getLogin()
Deprecated. PUBLIC: Return the login.
SessionProfiler getProfiler()
Deprecated. PUBLIC: Return the profiler.
void initializeAllIdentityMaps()
Deprecated. PUBLIC: Reset the entire object cache.
void initializeIdentityMap(java.lang.Class theClass)
Deprecated. PUBLIC: Reset the identity map for only the instances of the class.
void initializeIdentityMaps()
Deprecated. PUBLIC: This method clear the cache on the server.
void log(SessionLogEntry entry)
Deprecated. PUBLIC: Log the log entry.
void printIdentityMap(java.lang.Class businessClass)
Deprecated. PUBLIC: Used to print all the objects in the identity map of the passed in class.
void printIdentityMaps()
Deprecated. PUBLIC: Used to print all the objects in every identity map in this session.
void removeFromIdentityMap(java.lang.Object domainObject)
Deprecated. ADVANCED: Remove the object from the object cache.
void removeFromIdentityMap(java.util.Vector key, java.lang.Class theClass)
Deprecated. ADVANCED: Remove the object from the object cache.
void setExceptionHandler(ExceptionHandler exceptionHandler)
Deprecated. PUBLIC: Set the exceptionHandler.
void setLog(java.io.Writer log)
Deprecated. PUBLIC: Set the writer to which an accessor writes logged messages and SQL.
void setProfiler(SessionProfiler profiler)
Deprecated. PUBLIC: Set the profiler for the session.
void setSessionLog(SessionLog sessionLog)
Deprecated. PUBLIC: Set the session log to which an accessor logs messages and SQL.
void setShouldLogMessages(boolean shouldLogMessages)
Deprecated. PUBLIC: Set messages logging.
boolean shouldLogMessages()
Deprecated. PUBLIC: Return if all messages such as executed SQL commands should be logged.
void validateCache()
Deprecated. ADVANCED: This can be used to help debugging an object identity problem.

Methods inherited from class oracle.toplink.remote.DistributedSession
beginTransaction, commitTransaction, executeQuery, executeQuery, executeQuery, executeQuery, isConnected, release, rollbackTransaction, toString

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

Constructor Detail

ProxySession

public ProxySession(oracle.toplink.internal.remote.RemoteConnection remoteConnection)
Deprecated.
PUBLIC: Creates a ProxySession.
Parameters:
remoteConnection - remote session requires a remote connection. This must be accessed remotely from the client through RMI or CORBA.

Method Detail

acquireUnitOfWork

public oracle.toplink.publicinterface.UnitOfWork acquireUnitOfWork()
Deprecated.
PUBLIC: Return a unit of work for this session. The unit of work is an object level transaction that allows a group of changes to be applied as a unit.
Specified by:
acquireUnitOfWork in interface Session
Specified by:
acquireUnitOfWork in class DistributedSession
See Also:
UnitOfWork

compareObjects

public boolean compareObjects(java.lang.Object firstObject,
                              java.lang.Object secondObject)
Deprecated.
TESTING: Return if the two objects match completely. This checks the objects' attributes and their private parts.
Overrides:
compareObjects in class oracle.toplink.publicinterface.Session

compareObjectsDontMatch

public boolean compareObjectsDontMatch(java.lang.Object firstObject,
                                       java.lang.Object secondObject)
Deprecated.
TESTING: Return true if two objects do not match. This checks the objects' attributes and their private parts.
Overrides:
compareObjectsDontMatch in class oracle.toplink.publicinterface.Session

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.lang.Object domainObject)
Deprecated.
ADVANCED: Return if the domain object is in the identity map
Specified by:
containsObjectInIdentityMap in interface Session
Overrides:
containsObjectInIdentityMap in class oracle.toplink.publicinterface.Session

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
Deprecated.
ADVANCED: Return if the domain object (the instance of a class with primary key) is in the identity map
Specified by:
containsObjectInIdentityMap in interface Session
Overrides:
containsObjectInIdentityMap in class oracle.toplink.publicinterface.Session

executeQuery

public java.lang.Object executeQuery(DatabaseQuery query)
Deprecated.
PUBLIC: Execute the database query.
Specified by:
executeQuery in interface Session
Specified by:
executeQuery in class DistributedSession

getExceptionHandler

public ExceptionHandler getExceptionHandler()
Deprecated.
PUBLIC: Return a ExceptionHandler. The handler can catch errors that occur on queries or during database access.
Specified by:
getExceptionHandler in interface Session
Overrides:
getExceptionHandler in class oracle.toplink.publicinterface.Session

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
Deprecated.
ADVANCED: Return the object from the identity with the given object.
Specified by:
getFromIdentityMap in interface Session
Overrides:
getFromIdentityMap in class oracle.toplink.publicinterface.Session

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
Deprecated.
ADVANCED: Return the object from the identity with the primary key and class.
Specified by:
getFromIdentityMap in interface Session
Overrides:
getFromIdentityMap in class oracle.toplink.publicinterface.Session

getLogin

public DatabaseLogin getLogin()
Deprecated.
PUBLIC: Return the login.
Specified by:
getLogin in interface Session
Overrides:
getLogin in class oracle.toplink.publicinterface.Session

getProfiler

public SessionProfiler getProfiler()
Deprecated.
PUBLIC: Return the profiler. The profiler is a tool that can be used to determine performance bottlenecks. The profiler can be queries to print summaries and configure for logging purposes.
Specified by:
getProfiler in interface Session
Overrides:
getProfiler in class oracle.toplink.publicinterface.Session

initializeAllIdentityMaps

public void initializeAllIdentityMaps()
Deprecated.
PUBLIC: Reset the entire object cache. This method blows away both this session's and its parents caches, including the server cache or any other cache. This throws away any objects that have been read in. Extream caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.
Specified by:
initializeAllIdentityMaps in interface Session
Overrides:
initializeAllIdentityMaps in class DistributedSession

initializeIdentityMap

public void initializeIdentityMap(java.lang.Class theClass)
Deprecated.
PUBLIC: Reset the identity map for only the instances of the class. For inheritance the user must make sure that they only use the root class. Caution must be used in doing this to ensure that the objects within the identity map are not referenced from other objects of other classes or from the application.
Specified by:
initializeIdentityMap in interface Session
Overrides:
initializeIdentityMap in class oracle.toplink.publicinterface.Session

initializeIdentityMaps

public void initializeIdentityMaps()
Deprecated.
PUBLIC: This method clear the cache on the server. Extream caution should be used before doing this because object identity will no longer be maintained for any objects currently read in. This should only be called if the application knows that it no longer has references to object held in the cache.
Specified by:
initializeIdentityMaps in interface Session
Overrides:
initializeIdentityMaps in class oracle.toplink.publicinterface.Session

log

public void log(SessionLogEntry entry)
Deprecated.
PUBLIC: Log the log entry.
Specified by:
log in interface Session
Overrides:
log in class oracle.toplink.publicinterface.Session

printIdentityMap

public void printIdentityMap(java.lang.Class businessClass)
Deprecated.
PUBLIC: Used to print all the objects in the identity map of the passed in class. The output of this method will go the the Session's log.
Specified by:
printIdentityMap in interface Session
Overrides:
printIdentityMap in class oracle.toplink.publicinterface.Session

printIdentityMaps

public void printIdentityMaps()
Deprecated.
PUBLIC: Used to print all the objects in every identity map in this session. The output of this method will go to the Session's log.
Specified by:
printIdentityMaps in interface Session
Overrides:
printIdentityMaps in class oracle.toplink.publicinterface.Session

removeFromIdentityMap

public void removeFromIdentityMap(java.lang.Object domainObject)
Deprecated.
ADVANCED: Remove the object from the object cache. Caution should be used when calling to avoid violating object identity. The application should only call this is it knows that no references to the object exist.
Specified by:
removeFromIdentityMap in interface Session
Overrides:
removeFromIdentityMap in class oracle.toplink.publicinterface.Session

removeFromIdentityMap

public void removeFromIdentityMap(java.util.Vector key,
                                  java.lang.Class theClass)
Deprecated.
ADVANCED: Remove the object from the object cache.
Specified by:
removeFromIdentityMap in interface Session
Overrides:
removeFromIdentityMap in class oracle.toplink.publicinterface.Session

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
Deprecated.
PUBLIC: Set the exceptionHandler. Exception handler can catch errors that occur on queries or during database access.
Specified by:
setExceptionHandler in interface Session
Overrides:
setExceptionHandler in class oracle.toplink.publicinterface.Session

setLog

public void setLog(java.io.Writer log)
Deprecated.
PUBLIC: Set the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging logMessages() is used.
Specified by:
setLog in interface Session
Overrides:
setLog in class oracle.toplink.publicinterface.Session
See Also:
Session.logMessages()

setProfiler

public void setProfiler(SessionProfiler profiler)
Deprecated.
PUBLIC: Set the profiler for the session. This allows for performance operations to be profiled.
Specified by:
setProfiler in interface Session
Overrides:
setProfiler in class oracle.toplink.publicinterface.Session

setSessionLog

public void setSessionLog(SessionLog sessionLog)
Deprecated.
PUBLIC: Set the session log to which an accessor logs messages and SQL. If not set, this will default to a session log on a writer on System.out. To enable logging, logMessages must be turned on.
Specified by:
setSessionLog in interface Session
Overrides:
setSessionLog in class oracle.toplink.publicinterface.Session
See Also:
Session.logMessages()

setShouldLogMessages

public void setShouldLogMessages(boolean shouldLogMessages)
Deprecated.
PUBLIC: Set messages logging. Message logging will dump all SQL executed through TopLink to the session's log. By default this is System.out, but can be set to any Writer.
Specified by:
setShouldLogMessages in interface Session
Overrides:
setShouldLogMessages in class oracle.toplink.publicinterface.Session
See Also:
setLog(Writer)

shouldLogMessages

public boolean shouldLogMessages()
Deprecated.
PUBLIC: Return if all messages such as executed SQL commands should be logged.
Specified by:
shouldLogMessages in interface Session
Overrides:
shouldLogMessages in class oracle.toplink.publicinterface.Session

validateCache

public void validateCache()
Deprecated.
ADVANCED: This can be used to help debugging an object identity problem. An object identity problem is when an object in the cache references an object not in the cache. This method will validate that all cached objects are in a correct state.
Specified by:
validateCache in interface Session
Overrides:
validateCache in class oracle.toplink.publicinterface.Session

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.