[jboss-user] [EJB 3.0] - EJB3 stateless session bean local proxy threading

hjhjr4 do-not-reply at jboss.com
Thu Oct 30 16:27:53 EDT 2008


Can an instance of EJB3 stateless session bean local proxy received from 
  context.lookup() 
be used from multiple threads?

For example, I have a utility function that can be called from multiple threads and that has to access stateless session bean. 
Should it be implemented like this:

1.
public class Util {
   private static ConfigurationEjb conf = context.lookup(...)

   public static func() {
      conf.getValue()........
   }
}

or like this:

2.
public class Util {
   public static func() {
      ConfigurationEjb conf = context.lookup(...) //is this expensive???
      conf.getValue()........
   }
}



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

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



More information about the jboss-user mailing list