I suspect that the LocalStatelessSessionProxyFactoryBean class and the Remote version cache classes as it seems when I hot deploy the classloader used for the cast class increases but the reference returned via the spring ApplicationContext is still from the old classloader.
I believe (although someone with more knowledge would need to confirm) that since the spring class is loaded from a jar in the lib then this classloader is not touched on hot-deploy.
Can anyone confirm? and if so does anyone have a workaround. I cannot think of one off the top of my head (but I cannot believe you cannot hot deploy if using spring in this way)
ps the code I am using to locate the bean is
BeanFactoryLocator bf = ContextSingletonBeanFactoryLocator.getInstance();
BeanFactoryReference br = bf.useBeanFactory("com.a.b");
ApplicationContext context = (ApplicationContext)br.getFactory();
NotificationService svc = (NotificationService)context.getBean("NotificationService");