Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.common.security
Interface LwsSessionContext

All Superinterfaces:
java.security.Principal
All Known Implementing Classes:
ApplSessionManagement

public interface LwsSessionContext
extends java.security.Principal


Method Summary
 void attachSession(LwsSession session, java.sql.Connection conn)
          attaches the LwsSession to the connection, and associates with this LwsSessionContext.
 LwsSession createAttachedSession(java.sql.Connection conn)
          Creates a new Java LWS session instance and attach it to the specified database connection.
 LwsSession createSession()
          Creates a brand new Java LWS session instance.
 LwsSession createSession(LwsUser user)
          Creates a new Java LWS session instance as the specified user.
 void destroySession()
          destroy the LWS session in the database.
 void detachSession()
          detaches the LWS session from the db connection if it is in Attach state.
 LwsSession getAttachedSession()
          returns the attached LWS session if the session is attached.
 boolean isAttached()
          checks if the LWS session of this context is in Attach state.
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Method Detail

createSession

LwsSession createSession()
                         throws java.lang.Exception
Creates a brand new Java LWS session instance.

Returns:
a LWS session.
Throws:
java.lang.Exception - if it fails to create and attach a LWS session.

createSession

LwsSession createSession(LwsUser user)
                         throws java.lang.Exception
Creates a new Java LWS session instance as the specified user.

Returns:
a LWS session.
Throws:
java.lang.Exception - if it fails to create and attach a LWS session.

createAttachedSession

LwsSession createAttachedSession(java.sql.Connection conn)
                                 throws java.lang.Exception
Creates a new Java LWS session instance and attach it to the specified database connection. The LWS session will reference to the same LWS session in the database as the session in this context with the same session ID/cookie.

Returns:
a LWS session.
Throws:
java.lang.Exception - if it fails to create and attach a LWS session.

attachSession

void attachSession(LwsSession session,
                   java.sql.Connection conn)
                   throws java.lang.Exception
attaches the LwsSession to the connection, and associates with this LwsSessionContext.

Throws:
java.lang.Exception - if it fails to perform session Attach.

getAttachedSession

LwsSession getAttachedSession()
                              throws java.lang.Exception
returns the attached LWS session if the session is attached.

Returns:
the attached session
Throws:
java.lang.Exception - if the session is not in Attach state.

isAttached

boolean isAttached()
checks if the LWS session of this context is in Attach state.

Returns:
true if attached, false if not.

detachSession

void detachSession()
                   throws java.lang.Exception
detaches the LWS session from the db connection if it is in Attach state.

Throws:
java.lang.Exception - if it fails to perform session Detach.

destroySession

void destroySession()
                    throws java.lang.Exception
destroy the LWS session in the database.

When a user logs out, application should destroy the user's LWS session.

Throws:
java.lang.Exception - if the session is not in Attach state.

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.