tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Accessing an EJB by name from a servlet init method fails in collapsed ear if <load-on-startup> is specified for the servlet
Date Thu, 25 Aug 2011 06:57:27 GMT
FYI, I think I just fixed this last night in trunk (4.0.0-SNAPSHOT).  I Published new binaries
to the nexus snapshot repo.

Grab the latest build from here:


On Aug 7, 2011, at 9:02 PM, afryer wrote:

> Can you refer me to the spec where it says the environment naming context
> should not be accessible in callbacks like @PostConstruct?  I'm searching
> through the javaee_platform_6_0-fr-spec.pdf and servlet-3_0-pfd-spec.pdf and
> can't find mention of that.  In fact i think it says @PostConstruct gets
> called when after the class constructor and after all resources have been
> injected, implying that the environment naming context would be populated at
> that point.  Although its possible i'm missing something because I haven't
> read the spec with a fine tooth comb and it doesn't seem to explicitely
> detail the lifecycle, my impression is that the environment should be
> populated before the servlet init method is called.
> javaee_platform-6_0-fr-spec.pdf...
>> *EE.5.3.4 Java EE Product Provider’s Responsibilities*
>> The Java EE Product Provider has the following responsibilities:
>> ...
>> •Implement the java:comp, java:module, java:app and java:global
>> environment naming contexts, and provide them to the application component
>> instances at runtime. The naming context must include all the entries
>> declared by the Application Component Provider, with their values supplied
>> in the deployment descriptor or set by the Deployer. The environment
>> naming context must allow the Deployer to create subcontexts if they are
>> needed by an application component. Certain entries in the naming context
>> may have to be initialized with the values of other entries, specifically
>> when the “lookup” facility is used. In this case, it is an error if there
>> are any circular dependencies between entries. Similarly, it is an error
>> if looking up the specified JNDI name results in a resource whose type is
>> not compatible with the entry being created. The deployment tool may allow
>> the deployer to correct either of these classes of errors and continue the
>> deployment.
> --
> View this message in context:
> Sent from the OpenEJB User mailing list archive at

View raw message