如何实现RMI连接、J2EE服务的通用测试?
我想实现一个小测试来检查通过 RMI 与 J2EE 服务的连接。 它需要是通用的,这样我就可以给它一个属性文件,其中设置了以下属性:
java.naming.factory.initial=oracle.j2ee.rmi.RMIInitialContextFactory java.naming.security.principal=user java.naming.security.credentials=pass java.naming.provider.url=ormi://hostname:port/application
检查端口是不够的,因为其他应用程序可以成功部署在服务器上。 我不能假设我们环境中的所有应用程序都有默认方法(如 ping 方法)的默认服务,这会使事情变得更容易。
是否有我可以使用 java.naming.provider.url 执行的标准测试?
I'd like to implement a little test to check connectivity to J2EE services over RMI. It needs to be generic, so that I could just give it a property file with the following properties set in it:
java.naming.factory.initial=oracle.j2ee.rmi.RMIInitialContextFactory java.naming.security.principal=user java.naming.security.credentials=pass java.naming.provider.url=ormi://hostname:port/application
Checking the port is not sufficient, because other applications could be successfully deployed on the server. I can't assume that all applications in our environment have a default service with default method (like a ping method), which would make it much easier.
Is there a standard test I could perform using the java.naming.provider.url?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我选择了一种方法,它不像我想要的那么通用,但有效。
由于所有服务都部署在 Oracle OAS 上,因此我可以执行 opmnctl 来获取容器和所有应用程序的状态。 不漂亮,但它可以完成工作。
I settled for a method which isn't quite as generic as I would like, but which works.
Because all services are deployed on an Oracle OAS, I can execute opmnctl to get the status of the container and all applications. Not pretty, but it does the job.