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

Reply via email to