[jboss-user] [Performance Tuning] - Re: Single instance of utility per ejb service

PeterJ do-not-reply at jboss.com
Fri Sep 5 11:52:38 EDT 2008


Try using a factory to create the instance, where each EJB gives an identifier and the factory returns an instance based on that identifier. Sort of what the logging frameworks do when you lookup a logger.

Another alternative would be to place your shared JAR file into an EAR and use an isolated classloader. For example, EAR1 contains utility.jar and ejb1.jar, EAR2 contains utility.jar and ejb2.jar. And make the utility class a singleton.

There are probably other ways, but these two seem most appropriate.

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

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



More information about the jboss-user mailing list