I have a FactoryBean implementation and I use @PostConstruct to trigger off the resolution of some complex dependencies and generate a bean when required.
This all works fine in the development environment but fails to trigger when running in the OSGi container (Equinox). Changing the bean definition to have an init-method value equal to the method name sitting under the @PostConstruct makes everything run normally in the OSGi container.
I know that I include jsr250-api-1.0.jar in my project for the javax.annotation pacakges. I am running the OSGi container with JDK6 U11.
Must I make some additional steps with spring related bundles to ensure @PostConstruct annotations are detected for normal Spring bean lifecycle management? Or is it just a case of turning jsr250-api-1.0.jar into a bundle and loading that into the OSGi container ... I had been thinking the container would be supplying the javax packages already?!?