uhm, Seems like template could be passed by assisted injection since it doesn't make any send to use this class in different context. I would even use a builder to build the velocity context so that every members are immutable and that no modification is allowed afterward.