users@glassfish.java.net

Advice on Glassfish v3 Custom Login Module with EJBs and class loading

From: <glassfish_at_javadesktop.org>
Date: Wed, 22 Sep 2010 10:05:09 PDT

Hi there,
maybe i can get some advice on how to solve a problem with Glassfish v3 and a custom login module I've developed using EJBs. (Info about custom login modules, for example: http://www.theserverside.com/discussions/thread.tss?thread_id=60905 )
I need to Authenticate agains a Stateless Session Bean method, which returns a Entity EJB with user data. In my realm and login classes I locate the stateless session bean needed using JNDI, no problem with that but the problem is that the JEE app is deployed in the same Glassfish that will perform authentication.
If I just deploy the JEE application, the custom login module won't find classes, as the module classes needed are outside the application (in glassfish/lib dir).
If I add the EJBs (SSBean and Entity) classes to glassfish/lib so they are visible to the inner Auth classes, there must be some classloading conflicts as the JEE app won't deploy saying there is no EJB in the jars. (Classes are both in classpath and in the EJB jar to be deployed)
How can I solve this problem?

Thanks for any directions/help,
Ignacio
[Message sent by forum member 'icordoba']

http://forums.java.net/jive/thread.jspa?messageID=483356