You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Angel Angelov <an...@sayrix.com> on 2005/02/14 22:07:46 UTC
James and JavaServlet (Tomcat)
Hi all,
I need to share some objects between James and my servlet (at the moment
running on Tomcat).
Some suggestions how to do it?
I want to avoid (when possible) slow communications as a TCP/IP or file
sharing on the hard disk.
I was thinking to start James from my servlet, in this way they will run
in the same jvm and can share objects in the memory.
Is there a way to do this? If yes - how?
Thanks,
Angel
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: James and JavaServlet (Tomcat)
Posted by Gabor Kincses <np...@yahoo.com>.
Unless, you want to learn Avalon's lifecycle
management and launch Tomcat as an Avalon component
(which is probably the right way to go), you may do
the following.
Use org.apache.avalon.phoenix.launcher.Main in your
code to launch the Phoenix container. I had to
actually copy and edit it, since I had to replace the
class loader the Phoenix container uses. I can also
startup/shutdown Phoenix/James as many times as I
like.
IMHO, this is a hack and defeats the purpose of the
container. Unfortunately, Avalon seems to be fairly
intrusive (interface-based dependency injection),
which I didn't care to further investigate/implement.
Hope this helps,
Gabor
--- Angel Angelov <an...@sayrix.com> wrote:
> Hi all,
> I need to share some objects between James and my
> servlet (at the moment
> running on Tomcat).
> Some suggestions how to do it?
> I want to avoid (when possible) slow communications
> as a TCP/IP or file
> sharing on the hard disk.
>
> I was thinking to start James from my servlet, in
> this way they will run
> in the same jvm and can share objects in the memory.
> Is there a way to do this? If yes - how?
>
> Thanks,
> Angel
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> server-user-unsubscribe@james.apache.org
> For additional commands, e-mail:
> server-user-help@james.apache.org
>
>
=====
Gabor Kincses
Running Mandrake Linux 10.0
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org