cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elena Doyle" <ed...@admin.cam.ac.uk>
Subject RE: Configuring SSL
Date Mon, 16 Jun 2008 16:02:29 GMT
Andrus,

Many thanks for this. Copy and paste is what I am after!

Best wishes

Elena 

-----Original Message-----
From: Michael Gentry [mailto:blacknext@gmail.com] 
Sent: 16 June 2008 16:57
To: user@cayenne.apache.org
Subject: Re: Configuring SSL

Assuming you just want to browse or copy/paste from the code:

http://svn.apache.org/repos/asf/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/jav
a/org/apache/cayenne/conf/

Note that DataSourceFactory.java is an interface.  You'll probably want to also look at
DBCPDataSourceFactory.java for a concrete implementation.

/dev/mrg


On Mon, Jun 16, 2008 at 11:39 AM, Elena Doyle <ed284@admin.cam.ac.uk> wrote:
> Andrus,
>
> Many thanks for this. Due to bussiness needs I need to write a custom 
> one. As I am mostly a database and PL/SQL person, is the source code 
> of the standard Cayenne data factory available anywhere. I could not find it in the repository.
>
> Many thanks
>
> Elena
>
> -----Original Message-----
> From: Andrus Adamchik [mailto:andrus@objectstyle.org]
> Sent: 16 June 2008 15:57
> To: user@cayenne.apache.org
> Subject: Re: Configuring SSL
>
> 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/BasicDa
> taSource.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:halset@pvv.ntnu.no]
>> Sent: 14 June 2008 22:30
>> To: user@cayenne.apache.org
>> 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.
>>
>
>

Mime
View raw message