RE: OSUser and JBoss
"Brian Topping" <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Steven, If you haven't solved this already, here are some notes from the trenches here... I'm using OSUser within JBoss 3.2.1 just fine. I'm just using the standard stuff, but I think the notes still apply. I have some stuff that I am doing with MySQL and sequences in JBoss that require a library to be available before my jar is available. There is sometimes a choice between deployment convenience and programming convenience. In the former, you are trying to put all your code in one jar, in the latter, you are trying to avoid code like your direct JDBC access code by creating a jar to go in your configuration lib directory. That's what I would suggest here. Create a target in your build that creates a jar with one class -- your OSUser module -- and toss it in the configuration lib directory. JBoss is just a framework. If they didn't intend for you to modify the lib directory with different configurations, they would have made only one monolithic lib directory in the JBoss root. If you want to get your deployment convenience back as well, make a target that sets up a clean JBoss with all the correct libraries and configurations using <copy>. hope it helps, -b > -----Original Message----- > From: Steven Loftis [mailto:[email protected]] > Sent: Tuesday, June 10, 2003 11:01 PM > To: [email protected] > Subject: [Opensymphony-developers] OSUser and JBoss > > > Hi all, > > I've got an application for which is using the OSUser project > and running on > JBoss 3.2.1. I've written a Custom LoginModule (rather than using > OSUserLoginModule since I want to do some extra bits and > pieces in there). > Everything is configured correctly with regards security > domains etc (both > my web and ejb layers use the same domain which is configured > to use my > custom LoginModule). However, in my LoginModule's login() > method I want to > access a class which resides within my application (the > UserManager class) > which I will use to authenicate my user. > > To access this class the LoginModule must reside somewhere > within my ear > deployment file, if it resides in here, a LoginContext created in my > application can find the module class correctly. However > JBoss's security > interceptors (for the ejb layer for example) results in a > ClassNotFoundException from its classloader when it tries to > initialise the > LoginModule class (it'll create a LoginContext inside it's > JAASSecurityManager and try initialise and call login on the > specified > LoginModule to authenicate the calling user for the ejb > security domain). > > I've tried the ProxyLoginModule, however this still cannot > find the class > (unless it's somewhere else such as my server's lib > directory, which means > that it can't access the UserManager class I want out of my > application). > > Is there anyway of adding a path to a jar inside the ear as a > classpath > mbean for the server? Has anyone had any success stories with the > OSUserLoginModule? If this isn't possible I'm going to have > to resort to > using JDBC from my LoginModule to authenicate users on JBoss, > which is a > pain considering the authenication code is already written in > my UserManager > providers... > > Any thoughts would be appreciated! > > Thanks, > > Steven > > _________________________________________________________________ > On the move? Get Hotmail on your mobile phone > http://www.msn.co.uk/msnmobile > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of > TotalView, The best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > Opensymphony-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensymphony-developers > ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5