Another alternative is to delegate the ErrorHandler instantiation from the classname to CDI. The ErrorHandler would then be able to use @Inject etc