users@glassfish.java.net

Re: Is it possible to inject a realm?

From: <forums_at_java.net>
Date: Thu, 23 Jun 2011 04:13:00 -0500 (CDT)

from my experience the realm name defined on Glassfish is accessible only
from jaas context on web/ejb application when you define it as realm tag in
web.xml

for Resource injection in code  u have to define jndi on localhost:4848 ->>
Resurces/JNDI/Custom Resources

for my application ldap/openDS jndi properties that configured in glassfish
(Resurces/JNDI/Custom Resources) are :

Resource Type : javax.naming.directory.Directory

Factory Class : com.sun.jndi.ldap.LdapCtxFactory

java.naming.security.credentials: cn=Directory Manager

java.naming.security.principal: telman (password)

URL: ldap://localhost:1389

public class LoginMB {

    @Resource(name = "ldap/openDS")

...

regards

telman shahbazov

 


--
[Message sent by forum member 'telman']
View Post: http://forums.java.net/node/679241