[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Terracotta + Spring gives me Nullpointer Exception  XML
Forum Index -> Terracotta for Spring
Author Message
andersko

neo

Joined: 09/20/2012 01:22:13
Messages: 1
Offline

Hi!

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.


klalithr

consul

Joined: 01/23/2011 10:58:07
Messages: 489
Offline

Seems like you are using the DSO version of our product (as you have defined the beans in your tc-config.xml). For a more tight integration with Spring, I would strongly suggest that you use the Express version of Terracotta.

Karthik Lalithraj (Terracotta)
 
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team