geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Geronimo Wiki] Update of "Database Configuration" by JohnSisson
Date Wed, 20 Apr 2005 00:35:14 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Geronimo Wiki" for change notification.

The following page has been changed by JohnSisson:
http://wiki.apache.org/geronimo/Database_Configuration

New page:
'''Contents'''
[[TableOfContents]]

= Geronimo's Embedded Derby System =

Geronimo's `org/apache/geronimo/!SystemDatabase` configuraton starts the ["DerbySystem GBean"],
["DerbyNetwork GBean"], ["JDBCTransactionalThreadPooledTimer GBean"], ["JDBCNonTransactionalThreadPooledTimer
GBean"], and defines the ["SystemDatasource"] that is intended for use by Geronimo and associated
components (e.g. ActiveMQ).  The SystemDatasource is not intended for direct use by J2EE applications.


Refer to the ["DerbySystem GBean"] and ["DerbyNetwork GBean"] topics for further information
on configuring the embedded Derby system.

== Configuring a Server-Wide Datasource under the Embedded Derby System ==

The following command deploys the database plan file shown below using the Derby connector.

{{{
java -jar bin/deployer.jar deploy mydatabase-plan.xml \
               repository/geronimo/rars/geronimo-derby-connector-1.0-SNAPSHOT.rar
}}}

Sample database plan file:
{{{
<?xml version="1.0" encoding="UTF-8"?>

<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
    version="1.5"
    configId="com/mycompany/MyDatabase"
    parentId="org/apache/geronimo/SystemDatabase"
>

    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>jdbc/MYDB</name>
                    <config-property-setting name="UserName">applicationUsername</config-property-setting>
                    <config-property-setting name="Password">password</config-property-setting>
                    <config-property-setting name="DatabaseName">MYDB</config-property-setting>
                    <config-property-setting name="CreateDatabase">create</config-property-setting>
                    <connectionmanager>
                        <xa-transaction>
                            <transaction-caching/>
                        </xa-transaction>
                        <single-pool>
                            <max-size>10</max-size>
                            <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                    <global-jndi-name>MYDB</global-jndi-name>
                </connectiondefinition-instance>
             </connection-definition>
        </outbound-resourceadapter>
        
    </resourceadapter>

</connector>
}}}

Mime
View raw message