You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@excalibur.apache.org by Angel Todorov <at...@gmail.com> on 2007/02/21 13:21:41 UTC

Communication between webapps

Hi All,

I stumbled over the Excalibur project while googling - is it possible
to use it in order to achieve inter webapp communication in a servlet
container such as Tomcat, without having to put all jars that the two
webapps use in a shared dir (i.e. shared classloader) ?

Thank you in advance.

Best,
Angel

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


Re: Communication between webapps

Posted by Leo Simons <ma...@leosimons.com>.
Hi Angel,

On Feb 21, 2007, at 1:21 PM, Angel Todorov wrote:
> I stumbled over the Excalibur project while googling - is it possible
> to use it in order to achieve inter webapp communication in a servlet
> container such as Tomcat, without having to put all jars that the two
> webapps use in a shared dir (i.e. shared classloader) ?

For communication between different web applications, your best bets  
probably are

   * both use the same database backend
   * use JNDI
   * use J2EE (sorry JEE) features like EJB for the shared data
   * communicate using something like RMI or AltRMI
   * use some other communication protocol (servlets calling servlets  
for example)

Of these, I would probably suggest JNDI. Of course, it is possible to  
stuff things in an avalon container (like excalibur-fortress), and  
then stuff that container in a JNDI context. That's what I've usually  
done in the past :-)

We have experimented in the past with having servlet engines "on top  
of" avalon/excalibur containers, allowing to share blocks between  
them "the avalon way", but I don't think any of those efforts are  
currently actively maintained.

> Thank you in advance.

hope this helps,

Leo


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


Re: Communication between webapps

Posted by Berin Loritsch <bl...@d-haven.org>.
The only two choices to perform inter-webapp communication is to place
code in a shared classloader (such as Tomcat's common/lib directory),
or use a wire protocol.  The wire protocol will make a connection from
one webapp to another based on port/url etc.

The Servlet specification has gotten more and more strict in this sense,
because it is the only way to guarantee the promise of "write once run
anywhere", and to improve the security of the web applications.

Excalibur and company can help you organize components that can support
either approach.  To share the same code between two webapps in Tomcat,
store the excalibur components in common/lib and access them through the
JNDI lookup (NOTE: declare it in the server.xml and reference it with a
reference-link in the context.xml).  To have two webapps respond to
commands over a wire protocol, may I suggest using a RESTful approach. 
In that case using Excalibur doesn't really buy you much.

On 2/21/2007, "Angel Todorov" <at...@gmail.com> wrote:

>Hi All,
>
>I stumbled over the Excalibur project while googling - is it possible
>to use it in order to achieve inter webapp communication in a servlet
>container such as Tomcat, without having to put all jars that the two
>webapps use in a shared dir (i.e. shared classloader) ?
>
>Thank you in advance.
>
>Best,
>Angel
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@excalibur.apache.org
>For additional commands, e-mail: user-help@excalibur.apache.org
>

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