Hi all,

After moving the current social framework from Cassandra to SQL based
implementation I need to create a new data-source[1] and create related
table during initial server startup as well as start using the -Dsetup
flag. Since we maintain our own master-datasources.xml[2] I'm already done
with the first part.

What is the best approach we can take to init the DB(create table etc..)? I
guess we have common platform wide approach for this. At the moment I have
h2, mysql and oracle related scripts.

@Chan,
Can you explain the approach you take to init emm DB?

[1]

<datasource>
            <name>WSO2_SOCIAL_DB</name>
            <description>The datasource used for social framework
</description>
            <jndiConfig>
                <name>jdbc/WSO2SocialDB</name>
            </jndiConfig>
            <definition type="RDBMS">
                <configuration>
                    <url>
jdbc:h2:repository/database/WSO2SOCIAL_DB;DB_CLOSE_ON_EXIT=FALSE</url>
                    <username>wso2carbon</username>
                    <password>wso2carbon</password>
                    <driverClassName>org.h2.Driver</driverClassName>
                    <maxActive>50</maxActive>
                    <maxWait>60000</maxWait>
                    <testOnBorrow>true</testOnBorrow>
                    <validationQuery>SELECT 1</validationQuery>
                    <validationInterval>30000</validationInterval>
                </configuration>
            </definition>
        </datasource>

[2]
https://github.com/wso2/enterprise-store/blob/master/modules/distribution/src/repository/conf/datasources/master-datasources.xml

Regards,
UdaraR
-- 
*Udara Rathnayake*
Software Engineer
WSO2 Inc. : http://wso2.com

Mobile : +94 772207239
Twitter : http://twitter.com/udarakr
Blog    : http://udarakr.blogspot.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to