I've got an application that exports a single service via RMI.
Then to deploy this to the RMI registry...I have a Deploy class that looks like the following...Code:<beans> <bean id="someService" class="andrew.demo.services.SomeServiceImpl"/> <bean class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="serviceName" value="SomeService"/> <property name="service" ref="someService"/> <property name="serviceInterface" value="andrew.demo.services.SomeService"/> <!-- defaults to port 1099 --> </bean> </beans>
When that executes....that class blocks (i.e. it does not terminate). And the service is accessible, everythings fine...Code:public class Deploy { /** * @param args */ public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); System.out.println("ApplicationContext loaded."); } }
However...how do i get the application to shutdown...i've tried removing the entry from the rmiregistry....terminating the registry... yet the main method that started the application context appears to keep running.
Thanks in advance,
Andrew


Reply With Quote