I found the errors. The problem is in the server.xml.

in 7.0.8, I set as following:

<GlobalNamingResources>
<!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
<Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />

<Resource name="jdbc/dataSource_cppclient"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
username="xxx"
password="xxx"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:xxx"
maxWait="1000"
removeAbandoned="true"
maxActive="5"
maxIdle="5"
removeAbandonedTimeout="60"
logAbandoned="true"/>

</GlobalNamingResources>

in the 7.0.11, it didn't work. I have to set a context for my app and add the database resource config into the context. What I understand is that if I put the db resource in the GlobalNamingResources, every app can access it. Am I right? If i wnat to do so, how do I do?

-Henry

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to