Java Reference
In-Depth Information
ALTER TABLE SPIDER_HOST ADD (
CONSTRAINT PK_HOST_ID
PRIMARY KEY
(HOST_ID));
-- Create Sequences
CREATE SEQUENCE spider_workload_seq;
CREATE SEQUENCE spider_host_seq;
To make use of Oracle, you will need the Oracle JDBC driver. There are several different
drivers available for Oracle. Explaining all drivers is beyond the scope of this topic. However,
samples will be provided for the “thin” driver. This driver, along with other Oracle drivers, is
contained in a Jar file that you will obtain when you set up the Oracle client. The name of this
Jar file is as follows:
ojdbc14.jar
The name of the Jar file may change as new versions are released. However, you will need
to add this file to the classpath when you run a spider session that requires Oracle. The
driver that you must specify in your configuration file is as follows:
oracle.jdbc.driver.OracleDriver
Additionally, you will have to specify the database connection parameters in the database
URL. This URL will look similar to the following:
jdbc:oracle:thin:@127.0.0.1:1532:database_name
A sample configuration file is shown in Listing F.6.
Listing F.6: Sample Spider Configuration for Oracle
timeout:
60000
maxDepth:
-1
userAgent:
corePoolSize: 100
maximumPoolSize:100
keepAliveTime: 60
dbURL: jdbc:oracle:thin:@127.0.0.1:1532:database_name
dbClass: oracle.jdbc.driver.OracleDriver
dbUID:username
dbPWD:password
workloadManager:com.heatonresearch.httprecipes.spider.workload.
sql.oracle.OracleWorkloadManager
startup: clear
filter:com.heatonresearch.httprecipes.spider.filter.RobotsFilter
Search WWH ::




Custom Search