I'd avoid a singleton DAO. You will have to synchronize things, which will slow you down if thread A is already in your singleton.
In general, avoid dealing with your own threads inside of the container. The whole point of J2EE is to let the container-developers figure it out for you. I personally have used DAOFactory, and not used DAOFactory. If you're really doing some nutty stuff like changing which implementation you want to use on the fly (i.e., changing the value in a file, that is being read-in on a regular basis), you'd prefer writing a little MBean to do that. It'll be cached in memory and can be changed. But most things don't need to be that dynamic. I definitely wouldn't make a DAOImpl too dynamic. Are you going to switch our databases on the fly? Just curious why you might want to replace DAOImpl. There *is* a way in JBoss to have your interfaces not change, and change the implementation. Break the two into separate jars. If your implementation changes, just copy over the impl.jar. JBoss will pick it up without blowing away the objects that reference the interfaces. Steve View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3831200#3831200 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3831200 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user