-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jonathan,
Jonathan Mast wrote:
> class BeanBag {
> private static AppleBean appleBean = null;
> private static BananaBean bananaBean = null;
>
> public static AppleBean getAppleBean() {
Might I recommend that you use a "regular" class instead of one
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> Subject: Re: replacement for useBean directive
>
> do I really need synchronization at all?
Short answer: yes.
> Is synchronization really called for here, either
> around the getITEM() methods inside the beans or
&g
tITEM()
methods inside the beans or around the methods in BeanBag that return the
bean?
On Tue, Jan 6, 2009 at 11:14 AM, Caldarale, Charles R <
chuck.caldar...@unisys.com> wrote:
> > From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> > Subject: replacement for useBean d
> From: Jonathan Mast [mailto:jhmast.develo...@gmail.com]
> Subject: replacement for useBean directive
> wouldn't making the methods in BeanBag synchronized be
> a better approach?
Definitely. Centralize the required synchronization rather than burdening each
caller with it.
OK I know this isn't Tomcat-specific, but my post on Sun Forums didn't get
much of a reply, so I thought I'd try it here.
I'm in the process of translating a series of JSPs into straightout servlets
and I have a question about how I should replicate the functionality of the
useBean directive in m