This discussion is archived
1 Reply Latest reply: Jan 18, 2013 12:04 AM by EJP RSS

how to start RMI Server Jar on server?

814246 Newbie
Currently Being Moderated
Im using RMI, I have two jar files. One Server Jar which contains rmi server, registry start code and all methods which performs action on database .
I put this jar file on tomcat web-apps directory.
Another jar is containing User Interface code, which runs on client side.
for performing any action server jar needs to be run all the time and RMI Registry always needs to be started so that client can communicate with database.

How can i execute this server jar from client ?
  • 1. Re: how to start RMI Server Jar on server?
    EJP Guru
    Currently Being Moderated
    You can't execute the server from the client. The question doesn't begin to make sense. The server has to be already running for the client to have anything to connect to. You have to organise something at the server side to start it. And putting JAR files into the web apps directory doesn't accomplish that. You could write a Servlet or a listener that starts the RMI server when it's initialised, and stops it when destroyed. If you have to run it inside Tomcat at all, which isn't necessarily a good idea.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points