I have some distributed domain objects that hold onto references of Spring beans that are not distributed. The lifecycle of these domain objects is not managed by Spring, so I cannot use the very nifty <non-distributed-field> tag (which, if I understand correctly, automatically injects the VM local bean being referenced on each VM). This leaves me to declare the field as transient. However, how do I then inject a reference of the VM local bean into this domain object? I would like to do something like this in the on-load beanshell:
Code:
self.aclAuthStrategy = context.getBean("aclAuthStrategy")
Does the Spring module happen to provide access to the ApplicationContext to the beanshell onload? Since these are domain objects, they do not themselves have any reference to the ApplicationContext.