0

I am looking to implement a Java RMI Server in our corporate network. This Java RMI Server will provide information to our Java Eclipse Client. I have everything working when I run the Java RMI Server on a machine with RMIRegistry and the appropriate Java call to run the program.

I am looking for some advice/suggestions on how I can make it more robust. Specifically the Java RMI Server will connect to a SQL Server DB. How can I deal with things like DB Connection Pooling? How do I scale up the number of instances of the Java Server program to all of my users?

I'm sure there are a lot of things to consider and I was hoping for some clarity on whether or not I need to download something like JBoss or is it overkill?

I don't believe I'll be able to run the RMIRegistry and Java server program by itself but I'm not sure what my next steps are.

Thanks, Kevin

kevin
  • 65
  • 10

2 Answers2

0

You do not need to use JBoss to provide RMI services if you don`t need an application server. You can run spring over tomcat or even implement web services to increase interoperability.

Marcelo Keiti
  • 1,200
  • 9
  • 10
  • Thank you, I'll investigate spring and tomcat but if I used a web service, what would my server process be? – kevin Feb 20 '15 at 00:08
  • It depends of the purpose of your application. If you don`t need the resources of an application server you can implement REST Web Service with Spring over Tomcat or Jetty. – Marcelo Keiti Feb 20 '15 at 00:15
-1

Unless you have a truly specific need to do RMI, I'd simply punt on RMI and implement a web service against any of the servlet containers. It'll likely just be easier, if for no other reason there are zillions of others doing the same thing, so there's lots of support for it.

If you still feel you want to use RMI, consider instead using JMX.

JMX make RMI much more painless. Every VM has a JMX service running in it "for free" and JMX is running RMI underneath.

JMX is also rather ubiquitous in the Java world, so there are lots of tools that can be used to interact with your servers (such as JConsole).

JMX is basically the RMI transport, with a much friendlier surface for management.

It's very difficult today to justify a greenfield RMI app, frankly.

Will Hartung
  • 115,893
  • 19
  • 128
  • 203
  • I'm having a difficult time visualizing the processes running on the server. What would be the "servlet container" application? I'll investigate JMX, thanks! – kevin Feb 20 '15 at 00:07
  • 1
    When you say 'punt on', do you mean 'remove'? or 'forget'? It's not how 'punt on' is normally understood, at least by me. – user207421 Feb 20 '15 at 09:05