[ 
http://issues.apache.org/jira/browse/CACTUS-75?page=comments#action_12362525 ] 

Adrian Smith commented on CACTUS-75:
------------------------------------

I got round this by using a server.xml that looks a bit like this:

<Server port="8005" shutdown="SHUTDOWN" debug="0">
  <GlobalNamingResources>
    <Resource name="GlobalDefaultDS" scope="Shareable" 
type="javax.sql.DataSource"/>
    <ResourceParams name="GlobalDefaultDS">
      <parameter>
        <name>maxWait</name>
        <value>5000</value>
      </parameter>
      <parameter>
        <name>maxActive</name>
        <value>4</value>
      </parameter>
      <parameter>
        <name>password</name>
        <value>xxxxxx</value>
      </parameter>
      <parameter>
        <name>url</name>
        <value>jdbc:oracle:thin:@db.brassd.devenv1.bt.co.uk:1521:brassd</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>oracle.jdbc.OracleDriver</value>
      </parameter>
      <parameter>
        <name>maxIdle</name>
        <value>2</value>
      </parameter>
      <parameter>
        <name>username</name>
        <value>yyyyyyy</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>
  <Service name="Tomcat-Standalone">

    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="8080" minProcessors="5" maxProcessors="75"
               acceptCount="10" debug="0"/>

    <Engine name="Standalone" defaultHost="localhost" debug="0">

      <Realm className="org.apache.catalina.realm.MemoryRealm" />

      <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
        <DefaultContext>
           <ResourceLink name="DefaultDS"     global="GlobalDefaultDS"   
type="javax.sql.DataSource"/>
         </DefaultContext>
      </Host>

    </Engine>
  </Service>
</Server>


> Ant <cactus><tomcat4x> task does not function correctly with datasource 
> definitions
> -----------------------------------------------------------------------------------
>
>          Key: CACTUS-75
>          URL: http://issues.apache.org/jira/browse/CACTUS-75
>      Project: Cactus
>         Type: Bug
>   Components: Ant Integration
>     Versions: 1.5-rc1
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: Chris Mein (RBOS)

>
> I have set up a test suite using Cactus and have tested that it runs 
> correctly 
> using the <cactus> and <tomcat4x> tasks. When this runs the temporary tomcat 
> directory is created, my project-cactified.war file copied over and expanded 
> and the tests run.
> I however need to define some datasources in the tomcat server.xml file. I 
> copied the default server.xml file (created in the temp area) and add the 
> following type of definition:
> <Context path="/project-cactified" docBase="project-cactified" debug="0">
>   <Resource name="jdbc/RDC" auth="Container" type="javax.sql.DataSource"/>
>   <ResourceParams name="jdbc/RDC">
> <parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFac
> tory</value></parameter>
> <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</v
> alue></parameter>
> ...
>   </ResourceParams>
> </Context>
> After setting the serverxml attribute of the <tomcat4x> tag I try and run the 
> tests. What happens is that the project-cactified.war file is no longer 
> expanded by tomcat when it starts and the tests never run.
> I have confirmed that the steps I have taken should work by altering the 
> org.apache.cactus.integration.ant.container.AbstractContainer task so that 
> the 
> expanded project-cactified folder is not deleted. If it is present the tasks 
> work and my datasources are configured correctly.
> It seems that there is a problem either with Tomcat or Cactus where the 
> project-
> cactified.war file is not expanded if a context is defined in the server.xml 
> file. Perhaps the tomcat task could expand the war file by default to get 
> around this problem?
> Thanks for the useful product, Chris Mein

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to