You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sven A <er...@yahoo.com> on 2008/10/26 13:40:53 UTC

Tomcat 5.5 and RMI

Hi,

I'm looking at options in running our standalone RMI application within a
servlet container since we're planning to build support for http. I'm
currently testing our app on Tomcat 5.5 and my question is if Tomcat by
default actually dispatch incoming RMI calls to different threads. Looking
at the server stats in Tomcat manager it doesn't seem to be the case in
terms of active number of threads etc.

My second question is if there are servlet containers out there that has
support for RMI connectivity and can dispatch incoming requests.

Thanks
S
-- 
View this message in context: http://www.nabble.com/Tomcat-5.5-and-RMI-tp20173054p20173054.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Tomcat 5.5 and RMI

Posted by Gregor Schneider <rc...@googlemail.com>.
got the same scenario here:

- RMI-app (server)
- Servlet connecting to the RMI-server

However, that's not a Tomcat-issue:
Just code the RMI-calls within your servlet.

Hope I understood your problem correctly.

Cheers

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
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: Tomcat 5.5 and RMI

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
----- Original Message ----- 
From: "Sven A" <er...@yahoo.com>
To: <us...@tomcat.apache.org>
Sent: Sunday, October 26, 2008 2:40 PM
Subject: Tomcat 5.5 and RMI


>
> Hi,
>
> I'm looking at options in running our standalone RMI application within a
> servlet container since we're planning to build support for http. I'm
> currently testing our app on Tomcat 5.5 and my question is if Tomcat by
> default actually dispatch incoming RMI calls to different threads. Looking
> at the server stats in Tomcat manager it doesn't seem to be the case in
> terms of active number of threads etc.
>
> My second question is if there are servlet containers out there that has
> support for RMI connectivity and can dispatch incoming requests.
>
> Thanks
> S

Been there, done that ;)
Look at the link below...

eg I drop library (jar) into (harbor) "servlet" repository...

remote apps call it like this... in this case the class is called Factory, 
could be anything...

i_Factory = 
(I_Factory)vessel.loadRemoteClassInst(I_Factory.class,"net.uitestapp.Factory");//load 
a class instance ON the harbor

i_Factory.DoSomeThing("Hello World"); // etc etc local call against remote 
class

The calls are HTTP based...  no firewall problems...
Because HTTP every call is on its own thread...

If you want to share the class on multiple http threads... do the above with 
this call... loadRemoteSingleton

... combining remote apps with servlets and web services etc is all possible 
and easy.

And if you want to launch Swing apps or just the UI side of swing apps from 
tomcat and then make that talk to classes in tomcat, also very easy.
Its like Flex on steroids ;)

In the mailing lists we blabbing on about the financial crisis, ignore 
that.... Harbor hasnt fixed that yet ;)

Enjoy...

---------------------------------------------------------------------------
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
---------------------------------------------------------------------------
If you cant pay in gold... get lost...
http://coolharbor.100free.com/debt/usadebt.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


RE: Tomcat 5.5 and RMI

Posted by Martin Gainty <mg...@hotmail.com>.
A bit of confusion on what the op wanted ..a standalone RMIServer or remote access to EJB RMI Server?

path of least resistance would be to suggest the standalone RMI server as leon suggested
of course most of us use RMI for remote access to EJBServer but the op did'nt quite ask for that so a bit of confusion 
is understandable on what he wanted..

Assuming the OP meant I want to implement a standalone RMIServer there is a fairly comprehensive tutorial located here
http://www.iam.ubc.ca/guides/javatut99/rmi/overview.html

@echo on
java
-cp .;F:\rmi\compute.jar;%CLASSPATH%
-Djava.rmi.server.codebase=file:/F:/RMI/compute.jar
-Djava.rmi.server.hostname=localhost
-Djava.security.policy="java.policy" engine.ComputeEngine

where your java.policy contains requisite permissions to contact whatever host on port 1099
//Start RMI specific
    // allows anyone to listen on un-privileged ports
    permission java.net.SocketPermission "localhost:1099-", "connect,listen,resolve";
    //permission java.security.AllPermission "localhost:1099";
//End RMI specific

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> Date: Mon, 27 Oct 2008 12:32:29 +0100
> From: rosenberg.leon@googlemail.com
> To: users@tomcat.apache.org
> Subject: Re: Tomcat 5.5 and RMI
> 
> On Mon, Oct 27, 2008 at 12:08 PM, Gregor Schneider
> <rc...@googlemail.com> wrote:
> > Hi Leon
> >
> > On Mon, Oct 27, 2008 at 12:03 PM, Leon Rosenberg
> > <ro...@googlemail.com> wrote:
> >> Gregor,
> >> I think you misunderstood the OP (or maybe I did)
> >> but he wanted to receive incoming calls via RMI or HTTP, at least that
> >> was what he posted, and not using tomcat as client...
> >>
> >
> > I see... however, what sense would that make?
> >
> > If the OP wants to accept RMI-calls only, then why not get this job
> > done from his original RMI-server?
> 
> because he (in my understanding) wants to accept calls to same
> services via rmi OR http.
> 
> why not.
> Leon
> 
> >
> > Puzzled...
> >
> > Gregor
> > --
> > what's puzzlin' you, is the nature of my game
> > gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> > gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
> >
> > ---------------------------------------------------------------------
> > 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
> 

_________________________________________________________________
When your life is on the go—take your life with you.
http://clk.atdmt.com/MRT/go/115298558/direct/01/

Re: Tomcat 5.5 and RMI

Posted by Leon Rosenberg <ro...@googlemail.com>.
On Mon, Oct 27, 2008 at 12:08 PM, Gregor Schneider
<rc...@googlemail.com> wrote:
> Hi Leon
>
> On Mon, Oct 27, 2008 at 12:03 PM, Leon Rosenberg
> <ro...@googlemail.com> wrote:
>> Gregor,
>> I think you misunderstood the OP (or maybe I did)
>> but he wanted to receive incoming calls via RMI or HTTP, at least that
>> was what he posted, and not using tomcat as client...
>>
>
> I see... however, what sense would that make?
>
> If the OP wants to accept RMI-calls only, then why not get this job
> done from his original RMI-server?

because he (in my understanding) wants to accept calls to same
services via rmi OR http.

why not.
Leon

>
> Puzzled...
>
> Gregor
> --
> what's puzzlin' you, is the nature of my game
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> 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: Tomcat 5.5 and RMI

Posted by Gregor Schneider <rc...@googlemail.com>.
Hi Leon

On Mon, Oct 27, 2008 at 12:03 PM, Leon Rosenberg
<ro...@googlemail.com> wrote:
> Gregor,
> I think you misunderstood the OP (or maybe I did)
> but he wanted to receive incoming calls via RMI or HTTP, at least that
> was what he posted, and not using tomcat as client...
>

I see... however, what sense would that make?

If the OP wants to accept RMI-calls only, then why not get this job
done from his original RMI-server?

Puzzled...

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
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: Tomcat 5.5 and RMI

Posted by Leon Rosenberg <ro...@googlemail.com>.
Gregor,
I think you misunderstood the OP (or maybe I did)
but he wanted to receive incoming calls via RMI or HTTP, at least that
was what he posted, and not using tomcat as client...

regards
Leon

On Mon, Oct 27, 2008 at 11:58 AM, Gregor Schneider
<rc...@googlemail.com> wrote:
> Maybe one more statement to shed some light:
>
> Tomcat does not have any built-in support for RMI-connectivity but for
> the HTTP(S)-connectivity.
>
> If you want to forward incoming HTTP(S)-Requests to your RMI-server,
> you'll have to write a servlet which accepts the default
> HTTP(S)-requests and transforms them to RMI-requests which then will
> be sent by your servlet to your RMI-server.
>
> Aftter hat your servlet has to read the RMI-response which then will
> have to be transformed to an HTTP(S)-response which is sent back to
> the HTTP(S)-client (usually a web-browser).
>
> HTH
>
> Gregor
> --
> what's puzzlin' you, is the nature of my game
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available @ http://pgpkeys.pca.dfn.de:11371
>
> ---------------------------------------------------------------------
> 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: Tomcat 5.5 and RMI

Posted by Gregor Schneider <rc...@googlemail.com>.
Maybe one more statement to shed some light:

Tomcat does not have any built-in support for RMI-connectivity but for
the HTTP(S)-connectivity.

If you want to forward incoming HTTP(S)-Requests to your RMI-server,
you'll have to write a servlet which accepts the default
HTTP(S)-requests and transforms them to RMI-requests which then will
be sent by your servlet to your RMI-server.

Aftter hat your servlet has to read the RMI-response which then will
have to be transformed to an HTTP(S)-response which is sent back to
the HTTP(S)-client (usually a web-browser).

HTH

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
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: Tomcat 5.5 and RMI

Posted by Leon Rosenberg <ro...@googlemail.com>.
Hello Sven,

as mentioned before this has nothing to do with tomcat, your rmi
servant inside tomcat will manage its threads by himself without
tomcat manager having a chance to notice.
For the second question, I highly doubt there is a servlet container
there which cares for RMI, but why should there be any?

On an architectural note, you probably should take a look into
embedded tomcat, since in your case tomcat is just a connector to your
app with equal rights as rmi and others, and not the center of the
universe it usually considers himself to be.

regards
Leon

On Sun, Oct 26, 2008 at 1:40 PM, Sven A <er...@yahoo.com> wrote:
>
> Hi,
>
> I'm looking at options in running our standalone RMI application within a
> servlet container since we're planning to build support for http. I'm
> currently testing our app on Tomcat 5.5 and my question is if Tomcat by
> default actually dispatch incoming RMI calls to different threads. Looking
> at the server stats in Tomcat manager it doesn't seem to be the case in
> terms of active number of threads etc.
>
> My second question is if there are servlet containers out there that has
> support for RMI connectivity and can dispatch incoming requests.
>
> Thanks
> S
> --
> View this message in context: http://www.nabble.com/Tomcat-5.5-and-RMI-tp20173054p20173054.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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