Mittwoch, September 08, 2004
J2EE Web Authentication in conjunction with BC4J and JDBC Proxy Authentication
Proxy Authentication is designd to address connection performance problems associated with three-tier. Specifically, it allows to designate an already opend connection from a pool to a specific user with his privileges without logout and login each time.
BC4J-Framwork use the Strategie Pattern to customize the login and connection process. With JDeveloper 10g there is an default Implementation to use the feature. There are only tow single steps to use this feature in conjunction with J2EE login:
String DEFAULT_PWD = "myDefaultPwd123";
HttpContainer c = HttpContainer.getInstanceFromSession(session); c.setSessionCookie("myRootAppModule",null); // More informations about getInstanceFromSession
MyEnvInfoProvider.session.setAttribute(Configuration.DB_USERNAME_PROPERTY, request.getRemoteUser());
This Example works also with an x.509 certificate: see
Example of complete Connection Strategy for BC4J
More infos about proxy authentication
BC4J-Framwork use the Strategie Pattern to customize the login and connection process. With JDeveloper 10g there is an default Implementation to use the feature. There are only tow single steps to use this feature in conjunction with J2EE login:
- Set Connection Factory property jbo.ampool.sessioncookiefactoryclass to oracle.jbo.http.OCISessionCookieFactory in bx4j.xcfg (use the connfiguration dialog for the root Application module)
- or set follow Java option: -Djbo.ampool.sessioncookiefactoryclass=oracle.jbo.http.OCISessionCookieFactory
- Create a J2EE Login Page (Example in usage of OC4J)
- After successfull login you should call any methode to set the new user
String DEFAULT_PWD = "myDefaultPwd123";
HttpContainer c = HttpContainer.getInstanceFromSession(session); c.setSessionCookie("myRootAppModule",null); // More informations about getInstanceFromSession
MyEnvInfoProvider.session.setAttribute(Configuration.DB_USERNAME_PROPERTY, request.getRemoteUser());
This Example works also with an x.509 certificate: see
Example of complete Connection Strategy for BC4J
More infos about proxy authentication