Hello everyone, I have tried to expose and capture my services through RmiServiceExporter / RmiProxyFactoryBean. I can explain but can not catch the right way.
look here:
so you can faithless
and i can give that'sCode:RmiServiceExporter exporter = new RmiServiceExporter(); exporter.setServiceName("ServicoImp"); exporter.setService( event.getApplicationContext().getBean( "servico" ) ); exporter.setServiceInterface(Servico.class); exporter.afterPropertiesSet();
but the bean does not seem to be in the contextCode:RmiProxyFactoryBean factory = new RmiProxyFactoryBean(); factory.setServiceUrl( String.format("rmi://%s:1099/ServicoImp" , "192.168.10.86") ); factory.setServiceInterface(Servico.class); factory.setBeanClassLoader(appContext.getClassLoader()); factory.afterPropertiesSet(); factory.getObject(); // i can give here, but this is out context
when I try to get the bean this way:
Code:ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(apps); ctx.addApplicationListener( new MyCaptureSpringBeanApplicationListener() ); ctx.start(); Servico servico = (Servico) ctx.getBean("servicoImp");
I'm not just 'cause there is a proxy object.
someone can tell me anything about it?
thanks a lot



Reply With Quote
