tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [OT] How to call an external class from a webapp (i.e. - implement a plugin)
Date Wed, 07 Jul 2010 07:18:41 GMT
Goren Il wrote:
> 
>  so the basic idea is:
> 1. Define an interface (WSDL or named parameters for a "post" message)
> 2. Enable specifying the URL of the plugin in the context of the webapp
> 3. As part of the flow, call that URL with the defined format
> 
> Did I follow your thought?
> 
> It seems like an overhead in terms of performance, but if there is no 
> other possibility - this is what we shall do.
> Thanks
> 
Basically, I believe that this is what Chuck meant.  The "plugin" would be another 
separate webapp, and your webapp would make a HTTP request to it.

In Apache httpd, there is a concept of an "internal sub-request". This allows one 
"context" (the concept is a bit different there), to momentarily suspend its own execution

while it is itself making an internal request to the server for another URL/resource, then

collecting the result of this "sub-request", and continue its own execution.
Because this sub-request is purely internal to the webserver, it avoids a lot of the 
overhead that would result from a separate full HTTP request for instance (such as having

to create its own HTTP loopback connection etc..).

It would be interesting to learn from the experts here, if there would exist an efficient

and servlet-spec compatible way to implement such a mechanism in Tomcat.



> On 06-Jul-10 18:15, Caldarale, Charles R wrote:
>>> From: Goren Il [mailto:gorenil@hotmail.com]
>>> Subject: Re: How to call an external class from a webapp (i.e. -
>>> implement a plugin)
>>>
>>> Aren't there other webapps that have plugin capabilities?
>> The philosophy of the servlet spec is to have self-contained webapps, 
>> so plugins aren't really catered for.  (Might be something in the 3.0 
>> spec, but I haven't really studied it yet.)
>>
>> As an alternative to direct class calls, can you package the add-on as 
>> a separate context and reference it via forwarding or as a web service?
>>
>>   - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
>> PROPRIETARY MATERIAL and is thus for use only by the intended 
>> recipient. If you received this in error, please contact the sender 
>> and delete the e-mail and its attachments from all computers.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message