THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Download and install the most recent stable version of Tomcat 5.5. You can find it here:
http://tomcat.apache.org/download-55.cgi - Download the most recent official release of Derby from here: http://db.apache.org/derby/index.html.
The only file you'll need from this download is derby.jar - Stop Tomcat
- Copy derby.jar (from the derby distribution) to Tomcat_Home/common/lib
- Add the sample war file to Tomcat_Home/webapps
a.sample-companyweb-xxx.war (e.g. "sample-companyweb-1.0-incubator-M2.war") - Install the canned Derby database to Tomcat:
a.First, create a new directory named "Databases" to hold the sample database.Create
Tomcat_Home / Databases
b.Copy the dastest folder (and all its contents) from (build directory root OR where samples were unzipped/java/das/samples/companyweb) to Tomcat_Home/Databases.
*NOTE:
If you are running this from a sample distribution, the canned database is available in the
distribution, inside the databases directory.
- Define a DataSource by adding a datasource definition to Tomcat_Home/conf/server.xml.
a.Find the end-of-section marker </GlobalNamingResources> and add the following lines just above it:
No Format |
---|
<!-- Global Datasource for Derby dastest database --> <Resource name="jdbc/dastest" type="javax.sql.DataSource" auth="Container" description="Derby database for DAS Company sample" maxActive="100" maxIdle="30" maxWait="10000" username="" password="" driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby:{absolute path}Databases/dastest"/> |
*Requirement: You must include the absolute path to the "Databases" directory in the above url
attribute. Fore example:
url="jdbc:derby:c:\apache-tomcat-5.5.17\Databases/dastest"/>
...