geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radim Kolar <...@sendmail.cz>
Subject Re: custom jndi resources
Date Sat, 12 Nov 2011 17:10:59 GMT
i was confused by validating xml editor - entries are order sensitive. 
env-entry must be before resource-ref. I will write short blob post on 
this topic because G docs does not have this example.

<env-entry>
<description>dddd</description>
<env-entry-name>cass</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>MyValue</env-entry-value>
</env-entry>
--

JNDI lookups like

  Context initCtx = new InitialContext();
(String)initCtx.lookup("cass"));

fails with

javax.servlet.ServletException: javax.naming.NotContextException:

it works in glassfish that way. in geronimo you must have full path java:comp

both Geronimo and Glassfish pass J2EE test suite, maybe both are correct.


Mime
View raw message