james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TellorW" <zhpi...@fm365.com>
Subject i have successful use mail repository with oracle
Date Tue, 17 Apr 2001 03:04:59 GMT
file: james-message-oracle.sql

CREATE TABLE Message (
 message_name varchar2(200) primary key,
 repository_name varchar2(200) NOT NULL ,
 message_state varchar2(30) NOT NULL ,
 error_message varchar2(200) NULL ,
 sender varchar2(100) NOT NULL ,
 recipients varchar2(4000) NOT NULL ,
 remote_host varchar2(100) NOT NULL ,
 remote_addr varchar2(20) NOT NULL ,
 message_body long NOT NULL ,
 last_updated date NOT NULL 
);

you can store up to 2G char in message_body.

file: maildatabase-oracle

# Change the URL and username/password to match your configuration
# This driver is available for free at http://otn.oracle.com
# This only requires the JDBC 1.12 compatible driver
jdbcDriver=oracle.jdbc.driver.OracleDriver
jdbcURL=jdbc:oracle:oci8:@<your-oracle-alias>
jdbcUsername=<your-username>
jdbcPassword=<your-password>
minconn=1
maxconn=2

attention:
Oracle jdbc driver have two type: OCI8 and Thin,you can download both free from http://otn.oracle.com

if you use oci8 you must have oracle client installed and configured correctly in your computer.
and replace <your-oracle-alias> with your oracle tns name for your database;
and you must have classes12.zip in your classpath( see oracle jdbc documents and samples)
if you use thin the configure file maybe like this:
    jdbcDriver=oracle.jdbc.driver.OracleDriver
    jdbcURL=jdbc:oracle:thin:@<ip of your database server>:<port>:<sid>
(i just think so ,but i have not test it).

some problem with town:
i have download james-1.2.1,and when i use oracle to store mail,i have a town problem: can't
get primary key.
the file town.jar with james-1.2.1 is 2001-1-2. maybe it's too old,i replace it with town.jar(2001-2-8),it's
work.

I want this letter is useful to your work :)
i'm a Oracle DBA and java developer,maybe i can help you do something,
I was thinking about how to store user info into oracle database,now.


                                                            Tellor Wang
                                                          zhpingw@fm365.com

Mime
View raw message