Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to put an RMI server on a webserver

 
Raymund Beyer
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm new to RMI, I just went through a few tutorials.
Now I wonder, what is the best way to get my RMI server on a hosted webserver? I guess that I need an application server like Glassfish to do so on my webspace. Bur how do I start my server there? Are there recommendations which hosting provider supports RMI? Or would it be better to get a virtual server for this?

Questions over question. I would be glad, if anyone could push me to the right direction.

Thanks in advance

Ray
 
K. Tsang
Bartender
Posts: 3502
14
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there and welcome to the Ranch.

The RMI server on web server depends on whether your web hosting company allow you to. RMI uses port 1099 and web server uses port 80. So technically it is possible to run both server simultaneously.

To put RMI server on the web server first you need to write one. Once you do you need to deploy it on the web server. Make sure the hosting company enable the port 1099 for you to run RMI.

Hope this helps.
 
Ashley Burton
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

can you tell us why do you want to expose RMI service on public server?

You can use any free port(not only 1099, however it is the most common port for RMI) for this, but it is rather not common(as far as I know) to expose RMI services on the public server.

Best

Ash
 
Raymund Beyer
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's just for practice! What technique would you recommend to get a similar result (remote methods and passing objects)?

BTW: I guess the best solution for webhosting would be a virtual server, since there I have full control over the ports etc.

Best

Ray
 
Ashley Burton
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ray,

you can try to create web service.
I haven't ever seen public RMI services what does not mean this sollution is bad or forbidden. You have to dig

Best

Grzegorz


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic