Splash › Forums › PrettyFaces Users › Injection fails in rewrite processor. Injected components are always null › Re: Injection fails in rewrite processor. Injected components are always null
I think the easiest way for you is to use some library for this. Deltaspike for example contains a helper class called BeanProvider that can be used to manually look up beans like this:
MyService myService = BeanProvider.getContextualReference(MyService.class, false);
To include Deltaspike in your project just add this to your pom:
I think other libraries like Seam Solder and MyFaces CODI provide similar functionality.
If you find our tools useful, please consider making a donation to help us stay online and building software!