tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: JAAS login module
Date Sun, 04 May 2008 18:42:09 GMT
On May 4, 2008, at 6:26 AM, WhiteSock wrote:

>
> I wanna customize a login module instead of PropertiesLoginModule.
> In this login module, I wanna authenticate by the user and group  
> information
> stored in a database.
> Is there any chance that I can use the datasource configured in the
> openejb.xml?

Yes.  You should be able to lookup the datasource like so:

   InitialContext ctx = new InitialContext();
   DataSource ds = (DataSource) ctx.lookup("java:openejb/Resource/<id- 
of-the-resource>");


-David


Mime
View raw message