How do I get session values in the AppModuleImpl.java JDeveloper 10.1.3.0.4
848366Mar 18 2011 — edited Apr 5 2011This is my fisrt thread every, sorry if not giving you all the information you might need.
I'm tring to to populate a context on the database in the AppModuleImpl.java using the package security_pkg.set_security_context(see below) after using a backing bean that does the followingbut do not know how to "get" the session value in the AppModuleImpl.java. Opptimally I would like to set the context in the bean itself to keep all the logic in one place.
session.setAttribute(USER_NAME,loggedUserName);
session.setAttribute(RESPONSIBILITY,loggedUserResponsibility);
session.setAttribute(USER_ID,loggedUserId);
PROCEDURE set_security_context (
p_username IN VARCHAR2,
p_application IN VARCHAR2 DEFAULT 'TUHRA')
IS
BEGIN
-- Write the user info into the context area
SYS.DBMS_SESSION.set_context ('PL_CONTEXT', 'APP_USERNAME', p_username);
EXCEPTION
WHEN OTHERS
THEN RAISE_APPLICATION_ERROR(-20001,
'Error in SECURITY_PKG.SET_SECURITY_CONTEXT: ' || SQLERRM);
END;