Hi Elena,

IIRC, Oracle is the only database that wouldn't allow user properties to be appended to the DB URL (the approach I am using in similar situations for all other DB's). Unless the parenthesis notation allows to pass this property somehow (?), you have two choices:

1. ("easy") Switch to JNDI DataSource factory, and configure your Oracle driver at the web container level, which hopefully provides a way to set properties:

http://cayenne.apache.org/doc/using-jndi.html

2. ("harder") Write a custom DataSourceFactory. I mentioned this approach answering an unrelated question in a recent thread:

 http://markmail.org/message/ndv6534d2edj43rv

One possible strategy for a custom implementation is a factory that instantiates a commons-dbcp BasicDataSource based on some properties file:

 
http://commons.apache.org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html

Andrus

On Jun 16, 2008, at 12:51 PM, Elena Doyle wrote:

Hi Tore,

I am using oracle jdbc driver.
The documentation tells me to do this:

String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)
(HOST=servername)(PORT=2484))
(CONNECT_DATA=(SERVICE_NAME=servicename)))");
Properties props = new Properties();
props.setProperty("user", "scott");
props.setProperty("password", "tiger");
props.setProperty("oracle.net.ssl_cipher_suites",
"(SSL_DH_anon_WITH_3DES_EDE_CBC_SHA, SSL_DH_anon_WITH_RC4_128_MD5,
SSL_DH_anon_WITH_DES_CBC_SHA)"};
Connection conn=DriverManager.getConnection(url,props);

The cayenne configuration file  DomainNode.driver is like this:

<?xml version="1.0" encoding="utf-8"?>
<driver project-version="2.0" class="oracle.jdbc.driver.OracleDriver">
        <url value="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)
(HOST=myhostname)(PORT= 1521)) (CONNECT_DATA=(SERVICE_NAME=myservicename)))"/>
        <connectionPool min="1" max="1" />
        <login userName="scott" password="tiger"/>
</driver>

What I am struggling is how I add property oracle.net.ssl_cipher_suites to the configuration file?

Manay thanks

Elena





-----Original Message-----
From: Tore Halset [mailto:[EMAIL PROTECTED]
Sent: 14 June 2008 22:30
To: [email protected]
Subject: Re: Configuring SSL


On 13. juni. 2008, at 17.33, Elena Doyle wrote:

How can I configure SSL in DomeinNode.driver.xml. Can somebody give me
an example.

Do you mean SSL connection between your cayenne based application and the database? If so, this is a jdbc setup issue. Please take a look at your jdbc documentation. What sort of database are you
using?

Regards,
- Tore.


Reply via email to