tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: How to run own java application within Tomcat
Date Wed, 04 Jun 2008 14:59:33 GMT

----- Original Message ----- 
From: "Johnny Kewl" <john@kewlstuff.co.za>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Wednesday, June 04, 2008 4:43 PM
Subject: Re: How to run own java application within Tomcat


>
> ----- Original Message ----- 
> From: "Slobodanka Dimitrijevic" <sdimitrijevic@dirkzwager.com>
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Sent: Tuesday, June 03, 2008 10:18 PM
> Subject: RE: How to run own java application within Tomcat
>
>
>>Hi Johnny,
>
>>Thanks for the answer but I think I didn't explain my problem correctly.
>
>>I need the following situation:
>>1. a java application has to run continiously outside tomcat (when tomcat 
>>crashes the application must be still running). This application runs in 
>>its own virtual >machine (VM1).
>
>    when tomcat crashes... you have no faith ha ha... its tomcat, nothing 
> fishy about it ;)
>
>>2. I have also Axis2 webservices that have to have access to the objects 
>>in VM1. These webservices run inside Tomcat. However Tomcat runs in its 
>>own virtual >machine (VM2). So I have a problem.
>
>    Yes you do ;)
>
>>Question:
>>How to be able to run the java appplication (outside tomcat), and the 
>>Axis2 webservices (inside tomcat), in the same virtual machine
>
>
> As soon as you have applicatios in different VMs, you into interprocess 
> communications, RMI or the like.
> Even if that is not true, and its TC and an external app in the same VM, 
> you have "ring fenced" class loader problems.
> TC keeps itself away from the rest of the machine, which is actually a 
> good thing, else we'd all go insane.
>
> Using traditional Java technology its going to be something like RMI, or 
> another cross process technique like sockets (your own rmi).
> So soap call comes into TC, TC chats to external application thru a 
> socket, (or like the other poster suggested) an embedded TC app that also 
> has soap (a lot of work I think).
>
> So thats what you got to do...
>
> The POJO Application Server approach to this you may find interesting, but 
> its probably not want you want
>
> TC(Application inside TC) ----------- Application used from Network or 
> Internet (looks like the original app to the user)
> --------------------------------------- TC(Soap Application Using 
> Application inside another TC, or the same TC)
>
> Thats how it would be done in a PAS.... but its inside TC and well, you 
> think TC is going to "crash"... we used to be friends ;)
> Have fun....

Slobodanka, I just had another thought that you may want to read up on...
Java has an Extension class loader mechanism... but now we talking TC in the 
same JRE at least.
Theres a folder in the typical JRE that one can drop classes into, and then 
these are added to the JRE class path, so in theory TC should be able to 
find the application.
There is also a way to add a class or application to the Extension Class 
loader through the command line, I forget the details, but it will probably 
be too late because if TC is a service its going to want it ewhen the 
machine starts... so theres another maybe.

Just dont get this crazy idea... dont put the tomcat libs in the machines 
classpath... thats beeeeeeeg trouble... no no ;)

Shouldnt even be talking to you... "tomcats going to crash" ;)

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------






---------------------------------------------------------------------
To start a new topic, e-mail: users@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