geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher M. Cardona" <chris.m.card...@gmail.com>
Subject Re: ENC (Environment Naming Context) Question
Date Tue, 06 Mar 2007 16:42:31 GMT
David Jencks wrote:
>
> On Mar 5, 2007, at 4:50 AM, Christopher M. Cardona wrote:
>
>> Some questions about our ENC implementation:
>>
>> 1. How do we add/create a subcontext for "java:comp/env"? Do we have 
>> an API for doing this? I get 
>> javax.naming.OperationNotSupportedException when calling 
>> createSubcontext().
>
> Per the spec java:comp is read-only.  The content is set up in the 
> NamingBuilders during deployment: we construct a map of stuff, which 
> is turned into a Context using 
> EnterpriseNamingContext.createEnterpriseNamingContext.

David,

That explains it. Yes, I saw this called while debugging through the 
deployment of a webapp. Sorry I wasn't asking the right questions. What 
I was trying to do is bind a resource (e.g. JavaMail Session or JDBC 
DataSource) to the global jndi during deployment. I think I figured out 
where to do this during deployment but not exactly sure which context to 
use for binding. IIUC, we already bind something locally to the ENC so a 
particular module can have access to it at runtime. But if we wanted 
another module or even a standalone app (possibly a different jvm) to 
have access to those resources we need to use the global JNDI. Is my 
understanding correct? Am I asking the right questions here? :-) Any 
clarification would help.

Thanks,
chris

Mime
View raw message