Re: using static helper classes within servlets

2009-06-15 Thread Sid Sidney
I appreciate all of the great input. Thanks!!! --- On Mon, 6/15/09, Jonathan Mast wrote: From: Jonathan Mast Subject: Re: using static helper classes within servlets To: "Tomcat Users List" Date: Monday, June 15, 2009, 2:32 PM Sid, what everyone is saying about my first reply to yo

Re: using static helper classes within servlets

2009-06-15 Thread Jonathan Mast
z [mailto:ch...@christopherschultz.net] > > Subject: Re: using static helper classes within servlets > > > > You can get a significant performance improvement by doing this > > instead: > > > > private static final SomeBean someBean = new SomeBean(); > > &

RE: using static helper classes within servlets

2009-06-15 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: using static helper classes within servlets > > You can get a significant performance improvement by doing this > instead: > > private static final SomeBean someBean = new SomeBean(); > >

Re: using static helper classes within servlets

2009-06-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan, On 6/14/2009 1:01 PM, Jonathan Mast wrote: > class BeanBag { > private static SomeBean someBean = null; > > public static synchronized getSomeBean() { > if (someBean == null) someBean = new SomeBean(); >

Re: using static helper classes within servlets

2009-06-15 Thread Leon Rosenberg
On Mon, Jun 15, 2009 at 4:39 PM, Caldarale, Charles R wrote: >> From: Sid Sidney [mailto:pvcsv...@yahoo.com] >> Subject: Re: using static helper classes within servlets > > On a modern JVM, the synchronized block around the retrieval of the reference > will not cost much.  

RE: using static helper classes within servlets

2009-06-15 Thread Caldarale, Charles R
> From: Sid Sidney [mailto:pvcsv...@yahoo.com] > Subject: Re: using static helper classes within servlets > > I was hoping to avoid this by making the delegate a static > class or maybe a singleton. Not sure what you mean by "static class"; do you mean references to

Re: using static helper classes within servlets

2009-06-15 Thread Sid Sidney
't want to use the synchronized keyword b/c I'm sure it will affect performance and our site has a heavy load.  --- On Sun, 6/14/09, David Blevins wrote: From: David Blevins Subject: Re: using static helper classes within servlets To: "Tomcat Users List" Date: Sunday, June

Re: using static helper classes within servlets

2009-06-14 Thread David Blevins
: Thanks David, but we are stuck with Struts and EJB 2.1 at the moment. --- On Sun, 6/14/09, David Blevins wrote: From: David Blevins Subject: Re: using static helper classes within servlets To: "Tomcat Users List" Date: Sunday, June 14, 2009, 5:43 PM Hey all, If the goal is to

Re: using static helper classes within servlets

2009-06-14 Thread Sid Sidney
Thanks David, but we are stuck with Struts and EJB 2.1 at the moment. --- On Sun, 6/14/09, David Blevins wrote: From: David Blevins Subject: Re: using static helper classes within servlets To: "Tomcat Users List" Date: Sunday, June 14, 2009, 5:43 PM Hey all, If the goal is to e

Re: using static helper classes within servlets

2009-06-14 Thread David Blevins
contenu fourni. Date: Sun, 14 Jun 2009 13:01:31 -0400 Subject: Re: using static helper classes within servlets From: jhmast.develo...@gmail.com To: users@tomcat.apache.org I've not done anything with EJBs and I'm not sure what exactly you mean by static "properties".

Re: using static helper classes within servlets

2009-06-14 Thread Pid
Leon Rosenberg wrote: > Hello, > > On Sun, Jun 14, 2009 at 7:01 PM, Jonathan > Mast wrote: >> I've not done anything with EJBs and I'm not sure what exactly you mean by >> static "properties". I have however dealt with reducing instantiations in >> servlets. I simply created a BeanBag class with

Re: using static helper classes within servlets

2009-06-14 Thread Leon Rosenberg
Hello, On Sun, Jun 14, 2009 at 7:01 PM, Jonathan Mast wrote: > I've not done anything with EJBs and I'm not sure what exactly you mean by > static "properties".  I have however dealt with reducing instantiations in > servlets.  I simply created a BeanBag class with static methods to each one > of

RE: using static helper classes within servlets

2009-06-14 Thread Martin Gainty
n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Sun, 14 Jun 2009 13:01:31 -0400 > Subject: Re: using static h

Re: using static helper classes within servlets

2009-06-14 Thread Sid Sidney
ronized keyword. --- On Sun, 6/14/09, Jonathan Mast wrote: From: Jonathan Mast Subject: Re: using static helper classes within servlets To: "Tomcat Users List" Date: Sunday, June 14, 2009, 1:01 PM I've not done anything with EJBs and I'm not sure what exactly you mean by s

Re: using static helper classes within servlets

2009-06-14 Thread Jonathan Mast
I've not done anything with EJBs and I'm not sure what exactly you mean by static "properties". I have however dealt with reducing instantiations in servlets. I simply created a BeanBag class with static methods to each one of my beans; these are not "proper" beans, but where simply objects that