You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nuwan Arambage <nu...@gmail.com> on 2011/01/28 10:32:07 UTC

Why ActionProxy is used

Hi all ,
 this might be a trivial question and I hope  this is the right place
to raise my question.
Why do stuts2 implementers use ActionProxy. What is the purpose of the
this class.

I have read the description given in the core developer guide.Yet I
didn't get the idea.I appreciate if somebody can simplify the idea of
ActionProxy.

Thanks & Regards,

Nuwan Arambage


--
 Fail again. Fail better

With Regards ,
Nuwan  Arambage

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Why ActionProxy is used

Posted by Jordi Fernández <jo...@esilog.com>.
Via a Factory:

http://svn.apache.org/repos/asf/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java

Look for config.getContainer().getInstance(ActionProxyFactory.class).createActionProxy(...

Jordi.

On Fri, Jan 28, 2011 at 12:57 PM, Nuwan Arambage
<nu...@gmail.com> wrote:
> yes . I got it.. then I do have a another simple question. how does
> ActioProxy is created. is it a bytecode manipulation or other
> technique ?. I just need to clear things out
>
> Thanks
> Nuwan
>
>
> ---------- Forwarded message ----------
> From: Jordi Fernández <jo...@esilog.com>
> Date: 2011/1/28
> Subject: Re: Why ActionProxy is used
> To: Struts Users Mailing List <us...@struts.apache.org>
>
>
> ActionProxy is decorating
> (http://en.wikipedia.org/wiki/Decorator_pattern) the Action class you
> currently write by executing the interceptor stack defined by
> configuration in struts.xml.
>
> On Fri, Jan 28, 2011 at 12:05 PM, Nuwan Arambage
> <nu...@gmail.com> wrote:
>> yeah I got you idea. it does simplify the entire struts architecture.
>> so thing is thing.. as a design decision , why struts2 designers made
>> the it interceptor call via ActionProxy class.What is the fundamental
>> reason for that
>>
>> thanks
>>
>> Nuwan
>>
>>
>> ---------- Forwarded message ----------
>> From: Jordi Fernández <jo...@esilog.com>
>> Date: 2011/1/28
>> Subject: Re: Why ActionProxy is used
>> To: Struts Users Mailing List <us...@struts.apache.org>
>>
>>
>> Have you already seen this?
>> http://struts.apache.org/2.2.1/docs/big-picture.html
>>
>> On Fri, Jan 28, 2011 at 10:32 AM, Nuwan Arambage
>> <nu...@gmail.com> wrote:
>>> Hi all ,
>>>  this might be a trivial question and I hope  this is the right place
>>> to raise my question.
>>> Why do stuts2 implementers use ActionProxy. What is the purpose of the
>>> this class.
>>>
>>> I have read the description given in the core developer guide.Yet I
>>> didn't get the idea.I appreciate if somebody can simplify the idea of
>>> ActionProxy.
>>>
>>> Thanks & Regards,
>>>
>>> Nuwan Arambage
>>>
>>>
>>> --
>>>  Fail again. Fail better
>>>
>>> With Regards ,
>>> Nuwan  Arambage
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>> --
>>  Fail again. Fail better
>>
>> With Regards ,
>> Nuwan  Arambage
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> --
>  Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Why ActionProxy is used

Posted by Dave Newton <da...@gmail.com>.
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionProxy.html

<http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionProxy.html>
Dave

On Fri, Jan 28, 2011 at 6:57 AM, Nuwan Arambage <nu...@gmail.com>wrote:

> yes . I got it.. then I do have a another simple question. how does
> ActioProxy is created. is it a bytecode manipulation or other
> technique ?. I just need to clear things out
>
> Thanks
> Nuwan
>
>
> ---------- Forwarded message ----------
> From: Jordi Fernández <jo...@esilog.com>
> Date: 2011/1/28
> Subject: Re: Why ActionProxy is used
> To: Struts Users Mailing List <us...@struts.apache.org>
>
>
> ActionProxy is decorating
> (http://en.wikipedia.org/wiki/Decorator_pattern) the Action class you
> currently write by executing the interceptor stack defined by
> configuration in struts.xml.
>
> On Fri, Jan 28, 2011 at 12:05 PM, Nuwan Arambage
> <nu...@gmail.com> wrote:
> > yeah I got you idea. it does simplify the entire struts architecture.
> > so thing is thing.. as a design decision , why struts2 designers made
> > the it interceptor call via ActionProxy class.What is the fundamental
> > reason for that
> >
> > thanks
> >
> > Nuwan
> >
> >
> > ---------- Forwarded message ----------
> > From: Jordi Fernández <jo...@esilog.com>
> > Date: 2011/1/28
> > Subject: Re: Why ActionProxy is used
> > To: Struts Users Mailing List <us...@struts.apache.org>
> >
> >
> > Have you already seen this?
> > http://struts.apache.org/2.2.1/docs/big-picture.html
> >
> > On Fri, Jan 28, 2011 at 10:32 AM, Nuwan Arambage
> > <nu...@gmail.com> wrote:
> >> Hi all ,
> >>  this might be a trivial question and I hope  this is the right place
> >> to raise my question.
> >> Why do stuts2 implementers use ActionProxy. What is the purpose of the
> >> this class.
> >>
> >> I have read the description given in the core developer guide.Yet I
> >> didn't get the idea.I appreciate if somebody can simplify the idea of
> >> ActionProxy.
> >>
> >> Thanks & Regards,
> >>
> >> Nuwan Arambage
> >>
> >>
> >> --
> >>  Fail again. Fail better
> >>
> >> With Regards ,
> >> Nuwan  Arambage
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> >
> > --
> >  Fail again. Fail better
> >
> > With Regards ,
> > Nuwan  Arambage
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> --
>  Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Fwd: Why ActionProxy is used

Posted by Nuwan Arambage <nu...@gmail.com>.
yes . I got it.. then I do have a another simple question. how does
ActioProxy is created. is it a bytecode manipulation or other
technique ?. I just need to clear things out

Thanks
Nuwan


---------- Forwarded message ----------
From: Jordi Fernández <jo...@esilog.com>
Date: 2011/1/28
Subject: Re: Why ActionProxy is used
To: Struts Users Mailing List <us...@struts.apache.org>


ActionProxy is decorating
(http://en.wikipedia.org/wiki/Decorator_pattern) the Action class you
currently write by executing the interceptor stack defined by
configuration in struts.xml.

On Fri, Jan 28, 2011 at 12:05 PM, Nuwan Arambage
<nu...@gmail.com> wrote:
> yeah I got you idea. it does simplify the entire struts architecture.
> so thing is thing.. as a design decision , why struts2 designers made
> the it interceptor call via ActionProxy class.What is the fundamental
> reason for that
>
> thanks
>
> Nuwan
>
>
> ---------- Forwarded message ----------
> From: Jordi Fernández <jo...@esilog.com>
> Date: 2011/1/28
> Subject: Re: Why ActionProxy is used
> To: Struts Users Mailing List <us...@struts.apache.org>
>
>
> Have you already seen this?
> http://struts.apache.org/2.2.1/docs/big-picture.html
>
> On Fri, Jan 28, 2011 at 10:32 AM, Nuwan Arambage
> <nu...@gmail.com> wrote:
>> Hi all ,
>>  this might be a trivial question and I hope  this is the right place
>> to raise my question.
>> Why do stuts2 implementers use ActionProxy. What is the purpose of the
>> this class.
>>
>> I have read the description given in the core developer guide.Yet I
>> didn't get the idea.I appreciate if somebody can simplify the idea of
>> ActionProxy.
>>
>> Thanks & Regards,
>>
>> Nuwan Arambage
>>
>>
>> --
>>  Fail again. Fail better
>>
>> With Regards ,
>> Nuwan  Arambage
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> --
>  Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




-- 
 Fail again. Fail better

With Regards ,
Nuwan  Arambage

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Why ActionProxy is used

Posted by Jordi Fernández <jo...@esilog.com>.
ActionProxy is decorating
(http://en.wikipedia.org/wiki/Decorator_pattern) the Action class you
currently write by executing the interceptor stack defined by
configuration in struts.xml.

On Fri, Jan 28, 2011 at 12:05 PM, Nuwan Arambage
<nu...@gmail.com> wrote:
> yeah I got you idea. it does simplify the entire struts architecture.
> so thing is thing.. as a design decision , why struts2 designers made
> the it interceptor call via ActionProxy class.What is the fundamental
> reason for that
>
> thanks
>
> Nuwan
>
>
> ---------- Forwarded message ----------
> From: Jordi Fernández <jo...@esilog.com>
> Date: 2011/1/28
> Subject: Re: Why ActionProxy is used
> To: Struts Users Mailing List <us...@struts.apache.org>
>
>
> Have you already seen this?
> http://struts.apache.org/2.2.1/docs/big-picture.html
>
> On Fri, Jan 28, 2011 at 10:32 AM, Nuwan Arambage
> <nu...@gmail.com> wrote:
>> Hi all ,
>>  this might be a trivial question and I hope  this is the right place
>> to raise my question.
>> Why do stuts2 implementers use ActionProxy. What is the purpose of the
>> this class.
>>
>> I have read the description given in the core developer guide.Yet I
>> didn't get the idea.I appreciate if somebody can simplify the idea of
>> ActionProxy.
>>
>> Thanks & Regards,
>>
>> Nuwan Arambage
>>
>>
>> --
>>  Fail again. Fail better
>>
>> With Regards ,
>> Nuwan  Arambage
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> --
>  Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Why ActionProxy is used

Posted by Dave Newton <da...@gmail.com>.
On Fri, Jan 28, 2011 at 6:05 AM, Nuwan Arambage wrote:

> it does simplify the entire struts architecture. [...] why struts2
> designers made
> the it interceptor call via ActionProxy class.What is the
> fundamental reason for that
>

Didn't you just answer your question?

Perhaps the web can assist in your search:

http://en.wikipedia.org/wiki/Proxy_pattern
http://wiki.java.net/bin/view/Javapedia/ProxyPattern
http://www.netobjectives.com/PatternRepository/index.php?title=AdapterVersusProxyVersusFacadePatternComparison

Dave

Fwd: Why ActionProxy is used

Posted by Nuwan Arambage <nu...@gmail.com>.
yeah I got you idea. it does simplify the entire struts architecture.
so thing is thing.. as a design decision , why struts2 designers made
the it interceptor call via ActionProxy class.What is the fundamental
reason for that

thanks

Nuwan


---------- Forwarded message ----------
From: Jordi Fernández <jo...@esilog.com>
Date: 2011/1/28
Subject: Re: Why ActionProxy is used
To: Struts Users Mailing List <us...@struts.apache.org>


Have you already seen this?
http://struts.apache.org/2.2.1/docs/big-picture.html

On Fri, Jan 28, 2011 at 10:32 AM, Nuwan Arambage
<nu...@gmail.com> wrote:
> Hi all ,
>  this might be a trivial question and I hope  this is the right place
> to raise my question.
> Why do stuts2 implementers use ActionProxy. What is the purpose of the
> this class.
>
> I have read the description given in the core developer guide.Yet I
> didn't get the idea.I appreciate if somebody can simplify the idea of
> ActionProxy.
>
> Thanks & Regards,
>
> Nuwan Arambage
>
>
> --
>  Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




-- 
 Fail again. Fail better

With Regards ,
Nuwan  Arambage

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Why ActionProxy is used

Posted by Jordi Fernández <jo...@esilog.com>.
Have you already seen this?
http://struts.apache.org/2.2.1/docs/big-picture.html

On Fri, Jan 28, 2011 at 10:32 AM, Nuwan Arambage
<nu...@gmail.com> wrote:
> Hi all ,
>  this might be a trivial question and I hope  this is the right place
> to raise my question.
> Why do stuts2 implementers use ActionProxy. What is the purpose of the
> this class.
>
> I have read the description given in the core developer guide.Yet I
> didn't get the idea.I appreciate if somebody can simplify the idea of
> ActionProxy.
>
> Thanks & Regards,
>
> Nuwan Arambage
>
>
> --
>  Fail again. Fail better
>
> With Regards ,
> Nuwan  Arambage
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org