users@ejb-spec.java.net

[ejb-spec users] Question about section 16.2 of the 3.1 specification

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Tue, 7 Aug 2012 13:17:17 -0700

I have a stateless session bean that is attempting to examine its
environment during construction.

I had a programmatic JNDI lookup of the java:comp/env context from the
constructor. This is failing.

I am aware that I could perform this lookup from a @PostConstruct method
instead, but then I could not initialize certain final fields with the
return value.

Is such a lookup possible only in a @PostConstruct method? Does the
specification prohibit a lookup of this kind from the constructor directly?

Thanks,
Laird

-- 
http://about.me/lairdnelson