Hello,
I need some help using the proxy factory in the code below. When I use getBean() for the remoteService in the application code, it properly returns the service proxy object. But when I try to inject it into another bean, it doesn't work (ClassCastException is thrown on a $Proxy7 object). Neither with, nor without the factory.getObject() call. Can you tell me how to do it?
Code:(at)Bean public HttpInvokerProxyFactoryBean remoteService() { HttpInvokerProxyFactoryBean o = new HttpInvokerProxyFactoryBean(); o.setServiceUrl(Props.getApp().getProperty("sql.servlet.url")); o.setServiceInterface(IBatchService.class); return o; } (at)Bean public IServiceQueue remoteServiceQueue() { IServiceQueue o = new SwtServiceQueue(); o.setService((IBatchService) remoteService().getObject()); return o; }


Reply With Quote