Don't forget that with static methods you also can't use interfaces, abstract 
methods, method overriding, and all the rest of that OO goodness.

You'll end up with hard interdependencies between classes, which will also make 
you unit testing harder. 

Finally, *right now* you don't have state, but if later you add state (for 
whatever reason) then pooling instances will require changing all calling 
classes.

At least, those are reasons I can think of why you might prefer a singleton 
pattern to static calls. 

Why you might prefer EJBs to a plain j2se app is always about whether you want 
to make use of all the "pre-provided" extras as mentioned above, such as 
security and transactions, etc. 


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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to