简体   繁体   English

Java RMI和应用程序服务器

[英]Java RMI and Application Server

I am looking to implement a Java RMI Server in our corporate network. 我希望在我们的公司网络中实现Java RMI Server。 This Java RMI Server will provide information to our Java Eclipse Client. 该Java RMI Server将向我们的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. 当我在具有RMIRegistry的计算机上运行Java RMI Server并进行适当的Java调用以运行程序时,一切正常。

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. 特别是Java RMI Server将连接到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? 如何向所有用户扩展Java Server程序的实例数?

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? 我确定有很多事情要考虑,我希望我是否需要下载类似JBoss之类的东西还是有些矫kill过正?

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. 我不相信自己能够单独运行RMIRegistry和Java服务器程序,但是我不确定下一步是什么。

Thanks, Kevin 谢谢,凯文

You do not need to use JBoss to provide RMI services if you don`t need an application server. 如果不需要应用程序服务器,则无需使用JBoss提供RMI服务。 You can run spring over tomcat or even implement web services to increase interoperability. 您可以在tomcat上运行spring,甚至实现Web服务来提高互操作性。

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. 除非您确实确实需要执行RMI,否则我将简单地介绍RMI并针对任何servlet容器实施Web服务。 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. 如果您仍然想使用RMI,请考虑改用JMX。

JMX make RMI much more painless. JMX使RMI更加轻松。 Every VM has a JMX service running in it "for free" and JMX is running RMI underneath. 每个VM都有“免费”运行的JMX服务,并且JMX在下面运行RMI。

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在Java世界中也很普遍,因此有许多可用于与服务器交互的工具(例如JConsole)。

JMX is basically the RMI transport, with a much friendlier surface for management. JMX基本上是RMI传输,具有更友好的管理界面。

It's very difficult today to justify a greenfield RMI app, frankly. 坦白说,今天很难证明一个未开发的RMI应用程序是合理的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM