You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sid5 <si...@hotmail.com> on 2009/05/17 20:38:34 UTC

Invoking multiple webservices from Action

hi
We currently have a SOA based application with a struts front end.
We have to invoke multiple webservices to get the data to render a single
page.
I was thinking of writing an Executor service inside an Action class or an
Interceptor to do this.
Is this the right approach ?

I would like the webservices to be invoked in parallel.
 Are there any ParallelAction in struts.
-- 
View this message in context: http://www.nabble.com/Invoking-multiple-webservices-from-Action-tp23586299p23586299.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Invoking multiple webservices from Action

Posted by satyanarayana katta <sa...@gmail.com>.
In big enterprises everything is not controlled by one group.  There will be
a big legacy out there.  It is not just one or two webservices you call to
get the data.  In our case, we had call around 12 webservices.  Whatever
kind of optimization you do, it is difficult to beat what we can get out of
threading.  I totally understand he multithreading is not allowed by servlet
specification, but we didn't had an option but to use it.
Rgds,

Satya

On Mon, May 18, 2009 at 12:46 AM, Lukasz Lenart <
lukasz.lenart@googlemail.com> wrote:

> 2009/5/17 sid5 <si...@hotmail.com>:
> > We currently have a SOA based application with a struts front end.
> > We have to invoke multiple webservices to get the data to render a single
> > page.
> > I was thinking of writing an Executor service inside an Action class or
> an
> > Interceptor to do this.
> > Is this the right approach ?
>
> It's no so good to mess with threads on application server, as I
> remember it's not allowed by servlet specification, you should use
> given servlet specific approach.
>
> > I would like the webservices to be invoked in parallel.
>
> Why? If it's so slow, try to optimize them.
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Invoking multiple webservices from Action

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/5/17 sid5 <si...@hotmail.com>:
> We currently have a SOA based application with a struts front end.
> We have to invoke multiple webservices to get the data to render a single
> page.
> I was thinking of writing an Executor service inside an Action class or an
> Interceptor to do this.
> Is this the right approach ?

It's no so good to mess with threads on application server, as I
remember it's not allowed by servlet specification, you should use
given servlet specific approach.

> I would like the webservices to be invoked in parallel.

Why? If it's so slow, try to optimize them.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


Re: Invoking multiple webservices from Action

Posted by sid5 <si...@hotmail.com>.

satyanarayana katta wrote:
> 
> You can choose to write your own threading mechanism to invoke the
> webservices in parallel.  That is what we do.  We are using FJTask, which
> has a neater Fork and join mechanism for invoking the threads in parallel.
> 
> 
I was hoping that this would be a common use case to warrant an existing
interceptor, which I could use out of the box.
-- 
View this message in context: http://www.nabble.com/Invoking-multiple-webservices-from-Action-tp23586299p23588669.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Invoking multiple webservices from Action

Posted by satyanarayana katta <sa...@gmail.com>.
You can choose to write your own threading mechanism to invoke the
webservices in parallel.  That is what we do.  We are using FJTask, which
has a neater Fork and join mechanism for invoking the threads in parallel.

On Sun, May 17, 2009 at 11:38 AM, sid5 <si...@hotmail.com> wrote:

>
> hi
> We currently have a SOA based application with a struts front end.
> We have to invoke multiple webservices to get the data to render a single
> page.
> I was thinking of writing an Executor service inside an Action class or an
> Interceptor to do this.
> Is this the right approach ?
>
> I would like the webservices to be invoked in parallel.
>  Are there any ParallelAction in struts.
> --
> View this message in context:
> http://www.nabble.com/Invoking-multiple-webservices-from-Action-tp23586299p23586299.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>