You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Igor Borovkov <ig...@borovkov.com> on 2006/11/03 20:20:14 UTC

Communication with a standalone java program from servlets (embedded tomcat). RMI?

Hello!

I have a standalone java program permanently running on a server. I need to
communicate with that java program from servlets.

Could you suggest me a simplest solution how to do that. I think I should use
RMI. But there is one requirement – apache tomcat should be embedded to that
program. Will this requirement bring difficulties or not?

Thanks in advance.



---------------------------------------------------------------------
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


RE: Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Igor Borovkov [mailto:igor@borovkov.com] 
> Subject: Re[2]: Communication with a standalone java program 
> from servlets (embedded tomcat). RMI?
> 
> Sorry. I am not perfectly familiar with embedding tomcat 
> server at present time

You have it right; Martin's question doesn't make any sense.  The
embedded version of Tomcat is a separate download, and you have to
establish the server part of its configuration programattically at run
time.

> But may be it is good to have all application logic
> in one place cause we wouldn't need tomcat server
> for other purposes rather than for serving servlets
> that control the external java program.

This is exactly why the embedded version exists.  Look at the doc for:
    org.apache.catalina.startup.Embedded
at:
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/index.html

 - 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 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


Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

Posted by Igor Borovkov <ig...@borovkov.com>.
> Igor-

> when you say 'tomcat' should be embedded ..does this imply that <one+> of
> these tomcat constructs should be embedded?
> Servlet?
> Manager?
> MBean?
> Internals?


Sorry. I am not perfectly familiar with embedding tomcat server at present time
I just ment starting tomcat server from the java program and to stop it with closing
that standalone java program.
Perhaps bad idea.  But may be it is good to have all application logic in one place cause
we wouldn't need tomcat server for other purposes rather than for serving servlets that control
the external java program.


---------------------------------------------------------------------
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


Re: Communication with a standalone java program from servlets (embedded tomcat). RMI?

Posted by Martin Gainty <mg...@hotmail.com>.
Igor-

when you say 'tomcat' should be embedded ..does this imply that <one+> of these tomcat constructs should be embedded?
Servlet?
Manager?
MBean?
Internals?

Yes RMI uses RPC under the covers while providing complete and seamless (Complex) Object transmissions as well as fully supporting multi-threaded objects for your <enterrpise wide> web application. In other words you're on the right track..for more details  take a look at 
http://java.sun.com/javase/technologies/core/basic/rmi/whitepaper/index.jsp

Martin --
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: "Igor Borovkov" <ig...@borovkov.com>
To: <us...@tomcat.apache.org>
Sent: Friday, November 03, 2006 2:20 PM
Subject: Communication with a standalone java program from servlets (embedded tomcat). RMI?


Hello!

I have a standalone java program permanently running on a server. I need to
communicate with that java program from servlets.

Could you suggest me a simplest solution how to do that. I think I should use
RMI. But there is one requirement – apache tomcat should be embedded to that
program. Will this requirement bring difficulties or not?

Thanks in advance.



---------------------------------------------------------------------
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


RE: Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

Posted by Robert Harper <ro...@iat-cti.com>.
The big thing is scalability. If you leave them separate, you can put Tomcat
in one system and have your app running in another. This will help with
loading if either process ends up using a lot of CPU. Using RMI you can make
it loosely coupled where only the interface is known. As long as the
interface is not changed, you don't have to worry about changes in one
affecting the other.

Robert S. Harper
Information Access Technology, Inc.

-----Original Message-----
From: Igor Borovkov [mailto:igor@borovkov.com] 
Sent: Friday, November 03, 2006 1:08 PM
To: Robert Harper
Cc: 'Tomcat Users List'
Subject: Re[2]: Communication with a standalone java program from servlets
(embedded tomcat). RMI?


> I don't know of anything that requires you to embed Tomcat in your app.
They
> should be able to communicate just find as separate entities. You could
also

Thanks for your reply.

We thought about embedding tomcat (to startup it from the java program) to
simplify whole application and improve its portability, cause it is more
convient for us and our system to have all logic both of the java program
and
the servlets in one place.
But perhaps it is not really good idea.




---------------------------------------------------------------------
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





---------------------------------------------------------------------
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


Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

Posted by Igor Borovkov <ig...@borovkov.com>.
> I don't know of anything that requires you to embed Tomcat in your app. They
> should be able to communicate just find as separate entities. You could also

Thanks for your reply.

We thought about embedding tomcat (to startup it from the java program) to
simplify whole application and improve its portability, cause it is more
convient for us and our system to have all logic both of the java program and
the servlets in one place.
But perhaps it is not really good idea.




---------------------------------------------------------------------
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


RE: Communication with a standalone java program from servlets (embedded tomcat). RMI?

Posted by Robert Harper <ro...@iat-cti.com>.
I don't know of anything that requires you to embed Tomcat in your app. They
should be able to communicate just find as separate entities. You could also
maybe wrapper some OS specific IPC with JNI. We use RMI both internal to a
machine and externally to other machines just fine and you don't have to
have anything embedded. Your servlet can communicate to another
process/machine with no change in code except logic of where to connect.

Robert S. Harper
Information Access Technology, Inc.

-----Original Message-----
From: Igor Borovkov [mailto:igor@borovkov.com] 
Sent: Friday, November 03, 2006 12:20 PM
To: users@tomcat.apache.org
Subject: Communication with a standalone java program from servlets
(embedded tomcat). RMI?

Hello!

I have a standalone java program permanently running on a server. I need to
communicate with that java program from servlets.

Could you suggest me a simplest solution how to do that. I think I should
use
RMI. But there is one requirement - apache tomcat should be embedded to that
program. Will this requirement bring difficulties or not?

Thanks in advance.



---------------------------------------------------------------------
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





---------------------------------------------------------------------
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