This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes JNDI lookup from LoginModule class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "JNDI lookup from LoginModule class" Watch "JNDI lookup from LoginModule class" New topic
Author

JNDI lookup from LoginModule class

Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
Hello everybody,

I'm writing my own implementation of JAAS' LoginModule class. I have packaged this class in a jar file and added this jar as an application client module of my EAR.
When I try to deploy my application I get the following error:

org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: Failed to resolve ejb-link: SignonEJB make by ejb-name: ejb/SignonEJB)

Here is my ejb-ref element in my application-client.xml:

<ejb-ref>
<ejb-ref-name>ejb/SignonEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home></home>
<remote>br.com.dminder.signon.ejb.SignonRemote</remote>
<ejb-link>SignonEJB</ejb-link>
</ejb-ref>

I haven't created an ejb-jar.xml because I'm using annotations, but here is my jboss.xml
<enterprise-beans>
<session>
<ejb-name>SignonEJB</ejb-name>
<jndi-name>SignonEJB</jndi-name>
</session>
</enterprise-beans>

The SignonEJB is ejb module of my ear.

I'm not sure if MyLoginModule class needs to be an application client. I just need it to be able to find the SignonEJB, so I'm guessing it needs to have an ENC, right?
Is there a better way to implement this?

I'd be very greatful if anyone could help me with this.


J2EE Architect/Developer
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JNDI lookup from LoginModule class
 
Similar Threads
Ejb deployment issue
Error----web app could not find ejb module.
unresolved ejb-link
Failed to resolve ejb-link
JNDI and distributing EJB. How to set up?