geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Wong <mr.pcw...@gmail.com>
Subject Re: SSL connection between geronimo and postgresSQL
Date Wed, 30 Sep 2009 18:47:34 GMT
David,

Thanks a lot.  Here is what I have.
Please let me know, if you need more information.

Thanks a lot.

Paul

Here is the content in the "geronimo-application.xml" file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<app:application 
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" 
xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0" 
xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" 
xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" 
xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" 
xmlns:pers="http://java.sun.com/xml/ns/persistence" 
xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" 
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" 
xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1" 
application-name="DB Layer Application">
    <dep:environment>
        <dep:moduleId>
            <dep:groupId>mycompany.server</dep:groupId>
            <dep:artifactId>db</dep:artifactId>
            <dep:version>2.0.0</dep:version>
            <dep:type>car</dep:type>
        </dep:moduleId>
    </dep:environment>
    <app:module>
        
<app:connector>tranql-connector-postgresql-local-1.1.rar</app:connector>
        <app:alt-dd>META-INF/db-resource-adapter.xml</app:alt-dd>
    </app:module>
</app:application>

Here is the content in the "db-resource-adapter.xml" file:
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <dep:moduleId>
            <dep:groupId>mycomapny.server</dep:groupId>
            <dep:artifactId>MyDbPool</dep:artifactId>
            <dep:version>2.0.0</dep:version>
            <dep:type>rar</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>jdbc</dep:groupId>
                <dep:artifactId>postgresql</dep:artifactId>
                <dep:version>603</dep:version>
                <dep:type>jar</dep:type>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>MyDbPool</name>
                    <config-property-setting 
name="DatabaseName">MyDB</config-property-setting>
                    <config-property-setting 
name="ServerName">MyServer</config-property-setting>
                    <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>0</min-size>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>




David Jencks wrote:
> First time I've seen this message...
>
> IIRC the postgres tranql wrapper uses the postgres 
> ConnectionPoolDataSource (at least with tranql trunk).  To configure 
> ssl you'd need to be able to configure ssl using this postgres class.  
> If you can provide info on how to do that in the next day or two we 
> can make sure tranql can do it too in the next tranql wrapper release.
>
> thanks
> david jencks
>
> On Sep 30, 2009, at 10:25 AM, Paul Wong wrote:
>
>> This may be a re-sent.
>> Just not sure I was on the mailing list or not.
>>
>> Thanks a lot.
>>
>> Paul
>>
>>> Hi all,
>>>
>>> I am trying to setup a SSL connection between a Geronimo 
>>> (geronimo-tomcat6-javaee5-2.1.4) application and PostgresSQL 
>>> (postgresql-8.3.3-1) database.  The database has the SSL turn on.  
>>> However, I could not find the ConnectURL property to set.  A sample 
>>> connectURL string for PostgresSQL is like 
>>> "jdbc:postgresql://MyServer:5432/MyDB?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory".

>>>
>>>
>>> Here is the code in the db-resource-adapter.xml file
>>>
>>>           <connection-definition>
>>>               
>>> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>

>>>
>>>               <connectiondefinition-instance>
>>>                   <name>MyDbPool</name>
>>>                   <config-property-setting 
>>> name="DatabaseName">MyDB</config-property-setting>
>>>                   <config-property-setting 
>>> name="ServerName">MyServer</config-property-setting>
>>>                   <connectionmanager>
>>>                       <local-transaction/>
>>>                       <single-pool>
>>>                           <max-size>10</max-size>
>>>                           <min-size>0</min-size>
>>>                           <match-one/>
>>>                       </single-pool>
>>>                   </connectionmanager>
>>>               </connectiondefinition-instance>
>>>           </connection-definition>
>>>
>>> Any suggestion?
>>>
>>> Thanks a lot.
>>>
>>> Paul
>>>
>>>
>>>
>>
>
>


Mime
View raw message