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

Reply via email to