Joined: 09/20/2012 01:22:13
This is my setup:
I have an app that consist of a number of Spring beans, that live inside Spring. I use DI to inject the right dependencies. Works fine on one node.
I have integrated Spring and Terracotta, works well in most cases.
Problem is... In one of the beans i have a field that is defined in tc-config as transient, because I need to limit the object graph for peformance.
That still works fine on one node. But when this bean pops up on another node, it seems like Terracotta bypasses the Spring lifecycle of the bean, and the transient field is just set to "null" instead of being injected with the JVM-local instance of that particular bean.
Is there a way... That I could tell Spring and Terracotta that "when this bean is recreated/loaded on another JVM, it should have the correct bean with the local flavour inserted by Spring in the usual way"
Right now, this problem forces my application to a lot of suboptimal design choices since it disallows me to use DI to the full extent.
I use Terracotta 3.6.1 by the way.
Very thankful if somebody can shed some light on this, or suggest other options!
I have a working example I can post if needed.