-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Tim,
On 6/15/2009 12:43 PM, Tim Funk wrote:
> correction: The double checked idiom was "fixed" in java5. The variable
> which is checked needs to be declared as volatile. The link states that
> at the bottom.
...which is why I said:
>> There are cas
On Jun 15, 2009, at 9:32 AM, Christopher Schultz wrote:
On 6/14/2009 5:43 PM, David Blevins wrote:
Regardless of that choice we
will still handle sychronization of instantiation, so
double-check-locking or other things will not be necessary.
NB: DCL does not work in Java. Period.
http://www
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
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();
> >
&
> 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();
>
>
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: [OT] using static helper classes within servlets
>
> NB: DCL does not work in Java. Period.
While that statement was true for 1.4 and prior JVMs, 1.5 actually made DCL
work.
> http://www.cs.umd
correction: The double checked idiom was "fixed" in java5. The variable
which is checked needs to be declared as volatile. The link states that
at the bottom.
-Tim
Christopher Schultz wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 6/14/2009 5:43 PM, David Blevins wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David,
On 6/14/2009 5:43 PM, David Blevins wrote:
> Regardless of that choice we
> will still handle sychronization of instantiation, so
> double-check-locking or other things will not be necessary.
NB: DCL does not work in Java. Period.
http://www.
-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();
>
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.
> 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
'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
:
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
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
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".
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
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
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
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
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
HI,
In my web app, my servlets user several delegate classes that connect
to ejbs (session beans.) I was thinking
about putting these delegates into a helper class as static properties.
That way my servlets can just reference the same delegates. I
don't want to
21 matches
Mail list logo