-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Weird Tomcat / JAAS Login Module situation
PostPosted: Mon Nov 12, 2007 4:38 pm 
Newbie

Joined: Tue Mar 13, 2007 2:06 pm
Posts: 3
While attempting to write a custom LoginModule from Tomcat 6, we encountered an interesting situation that we cannot find a good way around. Like the LoginModule from http://www.hibernate.org/139.html, we were initializing a SessionFactory whenever the LoginModule's initialize() method was being called, which is when a user POSTs to j_security_check, and when our web application initializes as it uses Hibernate, too.

We took the code used for the LoginModule and placed it within Tomcat's /server/lib directory and placed the hibernate.cfg.xml file in /server/classes while the application was put under webapps (/webapps/blah) along with it's hibernate.cfg.xml. However, whenever the LoginModule was being invoked by the web application, the server was using the hibernate.cfg.xml for the webapp rather than the server as the webapp's classloader was being used.

Has anyone come across this situation with using Hibernate in a LoginModule in Tomcat? How is it possible to have Hibernate initialized in the LoginModule by the server rather than the invoking webapp? Am I correct in assuming that the LoginModule is invoked whenever any user POSTs to j_security_check?

Sincerely,
Andrew


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.