On 26-05-2010 at 19:53, Nikolaos Giannopoulos wrote: > Oscar, > [...] > The problem here appears to be that Spring beans get initialized > BEFORE Stripersist initializes itself... or at least that is how it > appears... and as such invocations to Stripersist after bean > creation / DI will throw errors regardless of whether I am doing > Constructor vs. Setter based injection... unless I am missing > something? > > If I did miss your point what do you propose as a solution?
I may have missed the point too, given your description. The NPE tells me that the class is in an invalid state. Some of the reasons may be that Spring isn't injecting that state (at all or yet), another that the interceptors are called in the wrong order. Due to the annotations, I do not believe the latter. As a result, I try to structure the code to force it to initialize the autowired dependencies first. Constructor injection does that, though I do not know if there is another way. Failing that, I'd hazard a guess that Spring isn't managing the instance that throws a NPE. Oscar -- ,-_ /() ) Oscar Westra van Holthe - Kind http://www.xs4all.nl/~kindop/ (__ ( =/ () Even if you win the rat race, you are still a rat...
signature.asc
Description: Digital signature
------------------------------------------------------------------------------
_______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users