0
votes

Is there any way to intercept the creation of a JSF backing bean to transparently decorate it?

I'm on Weblogic 10.3 with JDK 1.6, no CDI.

Perhaps subclassing the BeanManager class? But, how register the BeanManager extension to the weblogic jsf implementation?

1
Instead of creating a homegrown custom solution, not make the switch to CDI? Or search for a generic 'interceptor' mechanism (not jsf managed beans specific) - Kukeltje
@Kukeltje, because I have environment constraints from my client. I agree that Weblogic 10.3 and JDK 1.6 are obsolete technologies, but I have to use them. - Luca Scarpinati
I did not say to drop WL10.3 and jdk 1.6, I said try using CDI ;-) You could try adding it on that server. But it might not be supported - Kukeltje
@Kukeltje, maybe I could, yes, but on WL10.3 it seems daunting :) I have read many posts on this and... it seems daunting and not guaranteed to work. Moreover, we have a large application in production. So, if someone knows how to create the "homegrown custom solution" I asked, I'd be happy. - Luca Scarpinati
then look for general solutions like aspectj (or successors, I did not keep track of those libraries lately) - Kukeltje

1 Answers

-1
votes

You can use the @PostConstruct annotation for your init() method. This will ensure correct one-shot JSF backing bean initialization.