3 Replies Latest reply on Feb 17, 2011 11:23 AM by EJP

    Logging in RMI server

      Hi All,

      I have requirement that I need to start an RMI Server before I connect and use the components registered in it. So I have used the ProcessBuilder to start the external process. The process seems to be starting fine but all the logging is not shown anywhere. I couldn;t see any logs of the RMI server which makes difficult to debug any issues. I have also set the "java.util.logging.config.file" while starting the process using "java -jar myrmiserver.jar" and the loggin config file is part of the myrmiserver.jar.

      I am starting this process in a tomcat environment and connecting it from tomcat. Please suggest me how can I enable all the logs to be shown either on my tomcat logs or the RMI server specific logs.

        • 1. Re: Logging in RMI server
          Why start it in a separate process? Just export it from the Tomcat JVM. Then you get whatever logging configuration Tomcat is already using.
          • 2. Re: Logging in RMI server
            We need to access some legacy code which is not thread safe in a in a multithreaded environment. To support this kind of functionality we exposed the legacy code as Remote interface and registering the implemented component to a RMI registry. so when ever multiple therads wanted to access this code it will create a RMI serever for that and access it remotely.
            • 3. Re: Logging in RMI server
              But that doesn't solve the thread safety problem! RMI specifically makes no guarantees about that. See the RMI Specification. And neither does running it in a separate JVM!