They are not needed if you have a jndi.properties file on your classpath
that is setup correctly. Using a jndip.properties file is the preferred
way of setting up the InitialContext as it externalizes the configuration.
----- Original Message -----
From: Darius Davidavicius
To: JBoss-User
Sent: Thursday, February 22, 2001 3:34 AM
Subject: [jBoss-User] How to Setup JAAS Security documentaion
Hi all,
I just tested JAAS security mechanism on JBoss using How to..by Scott Stark
and it wors fine, well done dogs!
Just one difference from the my implementation and the documentation is:
StatelessSessionClient.java
try
{
// added by Darius Davidavicius
// I'm not sure if it is correct but these lines sample does not run.
// xxx.yyy.xxx.qqq - IP of computer where Jboss running
System.setProperty(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url","xxx.yyy.xxx.qqq:1099");
InitialContext jndiContext = new InitialContext();
StatelessSessionHome home = (StatelessSessionHome)
jndiContext.lookup("StatelessSession");
System.out.println("Found StatelessSessionHome");
StatelessSession bean = home.create();
System.out.println("Created StatelessSession");
System.out.println("Bean.echo('Hello') -> "+bean.echo("Hello"));
}
catch(Exception e)
{
e.printStackTrace();
}
If my added lines are neccesary it would be good somehow to update the document - lets
help people starting using JBoss in future.
If my ladded lines is not important I would like to know wy i need them ? :))
God luck all,
Darius Davidavicius
Living-Source
http://www.living-source.com/team_employee.php3?e_id=9&e_nextid=2
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]