tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22677] - JNDI not working in Default Context
Date Sat, 21 Feb 2004 14:16:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22677>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22677

JNDI not working in Default Context

dirk.verbeeck@pandora.be changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WORKSFORME



------- Additional Comments From dirk.verbeeck@pandora.be  2004-02-21 14:15 -------
You can define your global pool in GlobalNamingResources:
  <GlobalNamingResources>
    .....
    <Resource name="jdbc/GlobalEmployeeAppDb" auth="SERVLET"
type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/GlobalEmployeeAppDb">
        <parameter><name>username</name><value>sa</value></parameter>
        <parameter><name>password</name><value></value></parameter>
       
<parameter><name>driverClassName</name><value>org.hsqldb.jdbcDriver</value></parameter>
        <parameter><name>url</name><value>jdbc:hsqldb:database</value></parameter>
    </ResourceParams>
     ......
  </GlobalNamingResources>

And put a resource link in the context:
<Context>
   .....
   <ResourceLink 
      name="jdbc/LinkEmployeeAppDb" 
      global="jdbc/GlobalEmployeeAppDb" 
      type="javax.sql.DataSource"/>
   .....
</Context>

In your application you can lookup "jdbc/LinkEmployeeAppDb".

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message