[jboss-user] [JBoss Seam] - Separate ejb jar and war file, how to do jndi lookup

DamonChong do-not-reply at jboss.com
Thu Nov 8 01:26:39 EST 2007


I am trying to perform a jndi lookup of a stateless session bean (which is deployed separately in a ejb jar file) from a web application. I can do a normal JNDI as below:

  |     	try{
  | 	    	InitialContext ctx = new InitialContext();
  | 	        cacheSession = (SessionCache) ctx.lookup("SessionCacheSLB/local");
  |     	}
  |     	catch(Exception e){
  |     		e.printStackTrace();
  |     	}

But I wonder if I can instead do something like 

  | @JndiLookup("SessionCacheSLB/local")
  | SessionCache mySession;

That would really make my day! ;-)

And congrats to the JBoss Seam team for the launch of version 2.0 GA!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102779#4102779

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102779

More information about the jboss-user mailing list