I have a question about a J2EE App which uses the Spring Framework. It's a Web application deployed in a JBoss 4.0.5GA app server. I need to expose the services that provide the application to use these in a simple java standalone program. Off course, I use Spring to expose my interface and to access via RMI in the main method of my program. In resume, I'm following this instructions: http://www.stehno.com/articles/java/springrmijndi.php.
The problem is that the RMI Registry only initiate when I run the Web application in a browser. It creates something like this:
INFO [RmiRegistryFactoryBean] Looking for RMI registry at port '1099' WARN [RmiRegistryFactoryBean] Could not detect RMI registry - creating new one INFO [DefaultListableBeanFactory] Creating shared instance of singleton bean 'rmi.service.MyRemote' INFO [RmiServiceExporter] Binding RMI service 'myRemote' to registry at port '1099'
After running the web application, I could use my java standalone program because the RMI is activated as well. But... How can avoid this process and just when I run my Java App, it starts thw RMI Registry ???
But I don't understand how can I use the services exposed in the JBoss Server. In my Java app what must I do in the main method to use them. It's not clear for me :S ...