You should be injecting your dependencies. So if your EmailUtil
is being manually constructed, injection won't work. It needs to be container managed. So if you use a servlet, or any managed bean, you can @Inject
it. CDI injection only works for managed objects.
You can do some additional work arounds, such as manually invoking it against a constructed instance. Take a look at this question for an example like that: Parallel webservices access in a Weld CDI environment