tags:

views:

516

answers:

1

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?

A: 

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.

cecube