[jboss-user] [EJB 3.0] - trying to get the language from de jndi context in EJB3SLSB
putopuntocom
do-not-reply at jboss.com
Thu Feb 1 08:04:53 EST 2007
I'm creating a context for accessing a Stateless EJB3.
String JNDI_FACTORY = "org.jboss.security.jndi.JndiLoginInitialContextFactory";
| String JNDI_PROVIDER_URL = "jnp://localhost";
| String JNDI_PROVIDER_PORT = "1099";
|
| Properties prop = new Properties();
| prop.put( Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY );
| prop.put( Context.PROVIDER_URL, JNDI_PROVIDER_URL + ":"
| + JNDI_PROVIDER_PORT );
|
| prop.put( Context.LANGUAGE, "ca");
| prop.put( Context.SECURITY_PRINCIPAL, "test1");
| prop.put( Context.SECURITY_CREDENTIALS, "test1");
|
|
| InitialContext ctx = new InitialContext(prop);
Then I make the lookup and everythings works ok.
The quiz is:
How can I access to the Context.LANGUAGE from EJB3?.
I've tried:
- new InitialContext().getEnvironment()
| - new InitialContext().lookup(Context.LANGUAGE)
And this property doesn't exist.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009377#4009377
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009377
More information about the jboss-user
mailing list