You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Lars-Fredrik Smedberg <it...@gmail.com> on 2015/02/03 10:42:16 UTC

Question on @Resource and InitialContext

Hi

When injecting a env-entry using @Resource all works fine when the
env-entry exists, is there a way to get null when the env-entry not exists?
Right now the injection throws an exception.

A workaround is to lookup using InitialContext I assume? What exactly does
the lazy flag "make lazy"? Any pointers to source code would be fun to look
at

Regards
LF

-- 
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsmeden@gmail.com, and destroy all copies of this
message and any attachments.