David,

Where do I put this context.xml file?

I noticed that when I deploy the app using manager, then configure the
data sources using the admin tool... that a file names mrs.xml (mrs is
the name of the application I am deploying) is created
(/usr/local/tomcat/conf/Catalina/localhost), it contains all of the data
source information and app works fine, long as it is there.  However,
this file gets removed when I deploy via the webapp again, and then...
the application is broken again.

So, obviously the contents of mrs.xml are right, because the app works
while it's there... so you're saying I need to put this information into
context.xml, where should I put this context.xml file in the filesystem?
 Is it odd that this mrs.xml gets deleted when I deploy the app via the
manager?

I'm pasting the contents of the mrs.xml file below, again.. as long as
this mrs2.xml is in the directory noted above, the app works... but as
soon as I re-deploy the app through the web interface, this file gets
deleted and the app no longer works...

Thanks for your assistance.
jeff

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="/usr/local/tomcat/webapps/mrs2" path="/mrs2"
workDir="work/Catalina/localhost/mrs2">
  <Resource auth="Container" description="zos DB2 Connection"
name="jdbc/ZosDataSource" type="javax.sql.DataSource"/>
  <Resource auth="Container" description="local DB2 Connection"
name="jdbc/db2ds" type="javax.sql.DataSource"/>
  <Resource auth="Container" description="msql DB Connection"
name="jdbc/mssql2000ds" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/ZosDataSource">
    <parameter>
      <name>maxWait</name>
      <value>10000</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>2</value>
    </parameter>
    <parameter>
      <name>password</name>
      <value>AN12RAMA</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value>jdbc:db2://123.456.789.120:5019/NETSNDB01</value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>com.ibm.db2.jcc.DB2Driver</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>1</value>
    </parameter>
    <parameter>
      <name>username</name>
      <value>name</value>
    </parameter>
  </ResourceParams>
  <ResourceParams name="jdbc/db2ds">
    <parameter>
      <name>driverClassName</name>
      <value></value>
    </parameter>
  </ResourceParams>
  <ResourceParams name="jdbc/mssql2000ds">
    <parameter>
      <name>maxWait</name>
      <value>10000</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>2</value>
    </parameter>
    <parameter>
      <name>password</name>
      <value>pv345ankita</value>
    </parameter>
    <parameter>
      <name>url</name>

<value>jdbc:jtds:sqlserver://123.456.789.96/mrsuat;user=name;password=pv123ankita</value>
    </parameter>
    <parameter>


David Smith wrote:
> Best bet is to configure it manually in the context.xml for the webapp. 
> I've never had good luck with the administration webapp in the very few
> times I've tried to use it.
> You describe tomcat as over-writing the config submitted via the admin
> webapp.  It's more likely the admin webapp is changing the running state
> of tomcat but not persisting those changes to disk.  When you restart,
> it's as if you never made any changes at all.
> 
> --David
> 
> Jeffrey C. Baldwin wrote:
> 
>> (Tomcat 5.0.28 running on CentOS 4.4 using Java 1.4.2_14-b05)
>>
>> Hello All,
>>
>> I have a problem with my understanding of data sources within Tomcat.
>>
>> I have an application (MRS).  I deploy MRS using the Tomcat Manager.  I
>> then open up Tomcat Administration and I see MRS under:
>>
>> Tomcat Server - Service (Catalina) - Host (localhost) - Context (mrs)
>>
>> I then open up Resources -> Data Sources, and I 2 data source entries
>> have been crated (mssql & db2), however their configuration information
>> (url, driver class, etc..) is complete empty.  And, of course, the
>> application doesn't work because the JDBC calls are broken.
>>
>> I go in, using the Administration tool again, configure the data
>> sources, providing URL, driver class, etc.. commit the changes and
>> everything works great.
>>
>> THIS IS WHERE THE PROBLEM comes in, it all works great until we deploy
>> the application again.  Then the application, when deployed, just
>> overwrites all the data source information and I'm forced to enter it
>> all again for the app to work.
>>
>> I,  using the Administration tool, tried putting the data source entries
>> in for the entire Tomcat Server (Tomcat Server - Resources - Data
>> Sources) versus putting them in for the specific application.  However,
>> the app. still dosen't work.
>>
>> My question is, how do I make these data source entires 'stay put', so
>> that when the app is redeployed it can still make the JDBC calls?
>> Obviously I don't want to have to keep putting these in every time the
>> app is deployed.
>>
>> All help is appreciated.
>>
>> -jeff
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>  
>>
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to