I am running the following problem.
I have several managed Beans that are currently shared between two JSF applications. Since I don't want to copy and paste the code in two (more in the future), I put this shared managed Beans into the JAR library. I followed this blog: http://jsflive.wordpress.com/2011/03/24/custom-component-library/
Well, even if I put faces-config.xml inside JAR / META-INF / @ ManagedBean and @ViewScoped did not work. I could not understand why, but if I register Beans in faces-config.xml (JAR, not WAR), this problem will disappear.
I could live with this, but to my surprise, the @PostConstruct annotation was not called for this managed Beans inside the JAR library. I do not receive any errors, warnings or not. I believe Beans are loading, but their annotations are not being processed.
Has anyone come across this?
My environment: Glassfish 3.1.1 (build 12) JSF 2.1.3
Thanks in advance.
source share