Re: Making Action object as singleton

2002-06-23 Thread Sandeep Takhar

I'm pretty sure that action objects are created only
once by the server.

this question may have been answered before if this is
not what you are looking for.

sandeep
--- "Bhattad, Nilesh " <[EMAIL PROTECTED]> wrote:
> Hello
> 
> I have an Action object which is common for all JSP
> pages. It doesn't have
> any object level variable in it. What are all the
> advantages/disadvantages
> of making Action object as a singleton?
> 
> Thanks in advance !!
> 
> - Nilesh
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Making Action object as singleton

2002-06-21 Thread Joseph Barefoot

That's okay, everyone's learning around here, myself included.  :)

It's good that you were planning your Action as a Singleton, though, because
that's exactly how Struts treats all Action classes.  Therefore, as you
mentioned, you cannot have class-level member variables (unless they are
static or intended to be shared across sessions) and must pass values
through method calls instead.  Any state variables should go into the
ActionForm associated with the Action instead, or into the HttpSession if
this is not feasible for some reason.

peace,
Joe

> -Original Message-
> From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 2:23 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Making Action object as singleton
>
>
> Thanks for your clarification.
> I'm not yet much familiar with Struts framework. And I didn't know that
> Struts take care of making Action object as a Singleton. May be I
> should go
> back and study Struts in detail before implementing it!
>
> Thanks again.
>
> - Nilesh
>
>
>
> -Original Message-
> From: Joseph Barefoot [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 22, 2002 5:16 PM
> To: Struts Users Mailing List
> Subject: RE: Making Action object as singleton
>
> ?? -- Action objects are always singletons in the Struts
> framework, it only
> creates a single instance of each Action class for delegationdo you
> mean, "What the the advantages/disadvantages to having only a
> single Action
> class in my framework?"
>
> peace,
> Joe
>
> > -Original Message-
> > From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 21, 2002 1:56 PM
> > To: Struts mailing list ([EMAIL PROTECTED])
> > Subject: Making Action object as singleton
> >
> >
> > Hello
> >
> > I have an Action object which is common for all JSP pages. It
> doesn't have
> > any object level variable in it. What are all the
> advantages/disadvantages
> > of making Action object as a singleton?
> >
> > Thanks in advance !!
> >
> > - Nilesh
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Making Action object as singleton

2002-06-21 Thread Bhattad, Nilesh

Thanks for your clarification.
I'm not yet much familiar with Struts framework. And I didn't know that
Struts take care of making Action object as a Singleton. May be I should go
back and study Struts in detail before implementing it!

Thanks again.

- Nilesh



-Original Message-
From: Joseph Barefoot [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, June 22, 2002 5:16 PM
To: Struts Users Mailing List
Subject: RE: Making Action object as singleton

?? -- Action objects are always singletons in the Struts framework, it only
creates a single instance of each Action class for delegationdo you
mean, "What the the advantages/disadvantages to having only a single Action
class in my framework?"

peace,
Joe

> -Original Message-
> From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 1:56 PM
> To: Struts mailing list ([EMAIL PROTECTED])
> Subject: Making Action object as singleton
>
>
> Hello
>
> I have an Action object which is common for all JSP pages. It doesn't have
> any object level variable in it. What are all the advantages/disadvantages
> of making Action object as a singleton?
>
> Thanks in advance !!
>
> - Nilesh
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Making Action object as singleton

2002-06-21 Thread Joseph Barefoot

?? -- Action objects are always singletons in the Struts framework, it only
creates a single instance of each Action class for delegationdo you
mean, "What the the advantages/disadvantages to having only a single Action
class in my framework?"

peace,
Joe

> -Original Message-
> From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 21, 2002 1:56 PM
> To: Struts mailing list ([EMAIL PROTECTED])
> Subject: Making Action object as singleton
>
>
> Hello
>
> I have an Action object which is common for all JSP pages. It doesn't have
> any object level variable in it. What are all the advantages/disadvantages
> of making Action object as a singleton?
>
> Thanks in advance !!
>
> - Nilesh
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Making Action object as singleton

2002-06-21 Thread Bhattad, Nilesh

Hello

I have an Action object which is common for all JSP pages. It doesn't have
any object level variable in it. What are all the advantages/disadvantages
of making Action object as a singleton?

Thanks in advance !!

- Nilesh

--
To unsubscribe, e-mail:   
For additional commands, e-mail: