You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by amelumad <am...@yahoo.com> on 2007/08/24 16:07:06 UTC
Bind String constant to JNDI name
I need to bind a String constant to a JNDI name. This constant will be
accessed from a WAR module deployed on Geronimo 1.1. I tried to use
resource references in my deployment plan but either the binding does not
work or I am not using the correct context / name when trying to access it
hence I get JNDINamingException: Name not found.
The online documentation mainly concentrates on binding DB, EJBs and JMS
resources.
Could somebody clarify how can I resolve this issue.
Thanks in advance.
--
View this message in context: http://www.nabble.com/Bind-String-constant-to-JNDI-name-tf4323805s134.html#a12313147
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Bind String constant to JNDI name
Posted by LaurentB <la...@idelis.be>.
Is there any way to place this env-entry or similar anywhere else than in
web.xml?
I'm having the same issue where I'm trying to define a string constant that
is the location of a config file, and I'd like to have that definition
placed __outside__ of the WAR file. Otherwise, I can just hard code that
somewhere in the app ;-)
With Tomcat alone, I usually place an <Environment> entry in the context XML
file, which is located outside of the WAR. This entry is then accessible
from the webapp code via a JNDI lookup.
djencks wrote:
>
>
> On Aug 24, 2007, at 7:07 AM, amelumad wrote:
>
>>
>> I need to bind a String constant to a JNDI name. This constant
>> will be
>> accessed from a WAR module deployed on Geronimo 1.1. I tried to use
>> resource references in my deployment plan but either the binding
>> does not
>> work or I am not using the correct context / name when trying to
>> access it
>> hence I get JNDINamingException: Name not found.
>>
>> The online documentation mainly concentrates on binding DB, EJBs
>> and JMS
>> resources.
>>
>> Could somebody clarify how can I resolve this issue.
>
> that would be an env-entry in your web-app.xml
>
> thanks
> david jencks
>
>>
>> Thanks in advance.
>> --
>> View this message in context: http://www.nabble.com/Bind-String-
>> constant-to-JNDI-name-tf4323805s134.html#a12313147
>> Sent from the Apache Geronimo - Users mailing list archive at
>> Nabble.com.
>>
>
>
>
--
View this message in context: http://www.nabble.com/Bind-String-constant-to-JNDI-name-tf4323805s134.html#a13110139
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: Bind String constant to JNDI name
Posted by David Jencks <da...@yahoo.com>.
On Aug 24, 2007, at 7:07 AM, amelumad wrote:
>
> I need to bind a String constant to a JNDI name. This constant
> will be
> accessed from a WAR module deployed on Geronimo 1.1. I tried to use
> resource references in my deployment plan but either the binding
> does not
> work or I am not using the correct context / name when trying to
> access it
> hence I get JNDINamingException: Name not found.
>
> The online documentation mainly concentrates on binding DB, EJBs
> and JMS
> resources.
>
> Could somebody clarify how can I resolve this issue.
that would be an env-entry in your web-app.xml
thanks
david jencks
>
> Thanks in advance.
> --
> View this message in context: http://www.nabble.com/Bind-String-
> constant-to-JNDI-name-tf4323805s134.html#a12313147
> Sent from the Apache Geronimo - Users mailing list archive at
> Nabble.com.
>