Hello,

Can someone tell me why I need to have my database source defined in both my 
context.xml and server.xml?
I thought we are suppose to define it in only one location?

I can only log into my app if I have it defined in both my context.xml and 
server.xml


Below  is my database resource   as defined in server.xml..........

I have xxx out postgres URL for security reasons

<GlobalNamingResources>



                 <Resource  name="jdbc/app-pool" auth="Container"
                                      type="javax.sql.DataSource"  
driverClassName="org.postgresql.Driver"
                                      url="jdbc:postgresql://xxxxxxxxxxx"
                                      username="postgres" 
password="postgres4now"
                                      maxTotal="30"  maxIdle="30" 
maxWaitMillis="-1"
                                      removeAbandonedOnBorrow="true" 
removeAbandonedTimeout="90"
                                      testOnBorrow="true"  
validationQuery="select 1" validationQueryTimeout="30000"
                                      testWhileIdle="true"  
timeBetweenEvictionRunsMillis="60000"
                                      testOnReturn="true"
           />


  </GlobalNamingResources>



Below is my database resource   as defined in context.xml


<Context    >

    <Resources allowLinking="true" />



   <Resource  name="jdbc/app-pool" auth="Container"
                     type="javax.sql.DataSource"  
driverClassName="org.postgresql.Driver"
                     url="jdbc:postgresql://xxxxxxxxxx
                     username="postgres" password="postgres4now"
                     maxTotal="30"  maxIdle="30" maxWaitMillis="-1"
                     removeAbandonedOnBorrow="true" removeAbandonedTimeout="90"
                       testOnBorrow="true"  validationQuery="select 1" 
validationQueryTimeout="30000"
                       testWhileIdle="true"  
timeBetweenEvictionRunsMillis="60000"
                       testOnReturn="true"
           />




Rick Noel
Systems Programmer | Westwood One
rn...@westwoodone.com

Reply via email to