Click to See Complete Forum and Search --> : running two processes in the same virtual machine


Stefan
April 30th, 2000, 04:29 PM
Hi.

I don't really know where to turn here... I'm in deep trouble if I can't solve this one. The thing is that I'm using Tomcat as a web server and I already posted to a mailing list there. I think I'll just let you see what I wrote there:
-----BEGIN-------
Hi! Man do I need a quick and positive answer to this one!!! :o/

The thing is I'm doing this surveillance system for servers (as in client/server). It uses CORBA to communicate with the server it's monitoring and receives method invocations from it (things like clientConnected(info), dataPackageSent(info) and so on).
We're trying to provide remote administration to it through JSP and we've been developing the thing in each corner of the room (we're two who are working on it). I've been doing the JSP stuff and had pretty good success with it and my partner has been doing the CORBA stuff and likewise been pretty successful.
Tonight we tried to combine the two and wanted to see if we could remotely stop our system from logging information down to the database... well.. it didn't work. It didn't take a long time for us figuring out that the reason for this was that Tomcat was running on one java.exe process and the CORBA service application (which is just a java app... a class with a main function) was running on another. This probably means (and I'm guessing here) that they are being run on seperate virtual machines!?!?? Anyways... that's no good for us since now, the UI part (my JSP) is using a whole different set of class instances than his CORBA things. Which, in return, means that when I shut off "my" database connection... his is still fine and dandy!!! So we see one solution to the problem... have the same process create two threads... one running tomcat and the other running the corba server app.
Does anybody know if this is possible???

Please help, we're running out of time (this is a school project) and we really need a solution to this problem... And of course if anybody knows a better way to solve this... hey I'm all ears!!!

Kind regards,
Stefan
------END-------

Now if anybody knows a better way of doing this... I'm certainly open for it!

================================================
Did you know that in the new IP protocol (IPv6) there are enough IP addresses to give each protone on earth an IP address!
That's just about 3.7 million billion IP addresses per each square meter on the face of the earth. That's a lot of IP!

kib63613
April 30th, 2000, 08:24 PM
I don't know what the detail problem is. But I think that it should be impossible to have
UI and corba server in the same process, Virtual machine. In the application, the client
side access the remote method of the corba via the stub of the corba server. With this
scheme, we may get the distributed computing. I do not try the corba, but its usage
is similiar with RMI. I guess that you might ignore something. That is, I means that
the ui and corba server running on the two different process should not be the problem.
good luck,
Alfred Wu

Stefan
May 1st, 2000, 07:13 AM
Thanks... but I think we have found a solution to the problem. Well... we have two ways of doing this actually and one of them really looks like the way to go!
The thing is that I can make the CORBA server application into a servlet and start the server up whenever the web server starts up! That way the CORBA server is being run by the same VM as the other servlets/JSP and uses all the same resources! Pretty neat huh? And exactly what I'm looking for... this actually solves two problems for me! :o) That is... if it works!

Thanks for your time though.

Regards,
Stefan

================================================
Did you know that in the new IP protocol (IPv6) there are enough IP addresses to give each protone on earth an IP address!
That's just about 3.7 million billion IP addresses per each square meter on the face of the earth. That's a lot of IP!