Hi,

Please find the pull request for above RSS enhancement.

https://github.com/wso2-dev/carbon-storage-management/pull/9

Also I have attached the persistence.xml , rss-config.xml and
master-datasource.xml files herewith, I will continue working on updating
feature and product with latest changes.

Cheers,
Dhanuka
*Dhanuka Ranasinghe*

Senior Software Engineer
WSO2 Inc. ; http://wso2.com
lean . enterprise . middleware

phone : +94 715381915
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 -
 - Licensed to the Apache Software Foundation (ASF) under one
 - or more contributor license agreements.  See the NOTICE file
 - distributed with this work for additional information
 - regarding copyright ownership.  The ASF licenses this file
 - to you under the Apache License, Version 2.0 (the
 - "License"); you may not use this file except in compliance
 - with the License.  You may obtain a copy of the License at
 -
 -   http://www.apache.org/licenses/LICENSE-2.0
 -
 - Unless required by applicable law or agreed to in writing,
 - software distributed under the License is distributed on an
 - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 - KIND, either express or implied.  See the License for the
 - specific language governing permissions and limitations
 - under the License.
 -
 -->
<RSSConfiguration>
        <!-- Supported Provider types H2|MYSQL|ORACLE|POSTGRES|SQLSERVER -->
        <Provider>H2</Provider>

  	<!-- RSS database used to store database servers, database instance information, users etc.. -->
	<ManagementRepository>
	    <DataSourceConfiguration>
		<JndiLookupDefinition>
		     <Name>MetadataRepoDS</Name>
		</JndiLookupDefinition>
	    </DataSourceConfiguration>
	</ManagementRepository>

  	<!-- 'SYSTEM' instances are predefined constant server instances to be used by users,
       	the other type is User Defined RSS instances, which are defined by individual tenants -->
        <Environments>
            <!--Environment>
                <Name>DEFAULT</Name>
                <RSSInstances>
                    <RSSInstance>
                        <Name>WSO2RSS1</Name>
                        <InstanceType>SYSTEM</InstanceType>
                        <DbmsType>MYSQL</DbmsType>
                        <ServerCategory>LOCAL</ServerCategory>
                        <DataSourceConfiguration>
			    <Definition>
                                <Url>jdbc:mysql://localhost:3306</Url>
                                <Username>root</Username>
                                <Password>root</Password>
                                <DriverClassName>com.mysql.jdbc.Driver</DriverClassName>
                            </Definition>
		        </DataSourceConfiguration>
                    </RSSInstance>
                </RSSInstances>
             </Environment-->

	    <Environment>
                <Name>H2</Name>
                <DbmsType>H2</DbmsType>
                <RSSInstances>
                    <RSSInstance>
                        <Name>WSO2RSS2</Name>
                        <InstanceType>SYSTEM</InstanceType>
                        <DbmsType>H2</DbmsType>
                        <ServerCategory>LOCAL</ServerCategory>
                        <DataSourceConfiguration>
                            <Definition>
                                <Url>jdbc:h2:repository/database</Url>
                                <Username>root</Username>
                                <Password>root</Password>
                                <DriverClassName>org.h2.Driver</DriverClassName>
                            </Definition>
                        </DataSourceConfiguration>
                    </RSSInstance>
                </RSSInstances>
             </Environment>
        </Environments>
</RSSConfiguration>

 <persistence xmlns="http://java.sun.com/xml/ns/persistence";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";
	version="2.0">
	<persistence-unit name="sample" transaction-type="JTA">
			
 		<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

		<class>org.wso2.carbon.rssmanager.core.dto.common.DatabasePrivilegeTemplate</class>
		<class>org.wso2.carbon.rssmanager.core.dto.common.UserDatabaseEntry</class>
		<class>org.wso2.carbon.rssmanager.core.dto.common.UserDatabasePrivilege</class>
		<class>org.wso2.carbon.rssmanager.core.dto.common.DatabasePrivilegeTemplateEntry</class>
		<class>org.wso2.carbon.rssmanager.core.dto.restricted.DatabaseUser</class>
		<class>org.wso2.carbon.rssmanager.core.dto.restricted.Database</class>
		<class>org.wso2.carbon.rssmanager.core.dto.restricted.RSSInstance</class>
		<class>org.wso2.carbon.rssmanager.core.environment.Environment</class>

		<properties>
			
			<!--property name="eclipselink.persistencexml" value="/home/dhanukar/ss/wso2ss-1.1.0/repository/conf/etc/persistence.xml" /-->
			<property name="eclipselink.transaction.join-existing" value="true" />
			<property name="eclipselink.target-server" value="com.atomikos.eclipselink.platform.AtomikosPlatform" />
			<property name="eclipselink.ddl-generation" value="create-or-extend-tables" />
			 <property name="eclipselink.logging.level.sql" value="FINE"/>
 			<property name="eclipselink.logging.parameters" value="true"/>
			<property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.HSQLPlatform"/>
			<property name="eclipselink.jdbc.batch-writing" value="JDBC"/>

		</properties>
	</persistence-unit>
</persistence> 
<datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration";>
  
    <providers>
        <provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
    </providers>
  
    <datasources>
      
        <datasource>
            <name>WSO2_CARBON_DB</name>
            <description>The datasource used for registry and user manager</description>
            <jndiConfig>
                <name>jdbc/WSO2CarbonDB</name>
            </jndiConfig>
            <definition type="RDBMS">
                <configuration>
                    <url>jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</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>

	<!--datasource>
    		<name>MetadataRepo</name>
    		<jndiConfig>
        		<name>MetadataRepoDS</name>
    		</jndiConfig>
    		<definition type="RDBMS">
        	<configuration>
            	<dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
            <dataSourceProps>
                <property name="URL">jdbc:mysql://localhost:3306/rssdb110</property>
                <property name="user">root</property>
                <property name="password">root</property>
            </dataSourceProps>
            </configuration>
    	</definition>
</datasource-->

	<datasource>
            <name>MetadataRepo</name>
            <description>The datasource used for registry and user manager</description>
            <jndiConfig>
                <name>MetadataRepoDS</name>
            </jndiConfig>
            <definition type="RDBMS">
                <configuration>
                    <url>jdbc:h2:repository/database/rssdb110;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</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>

        <!-- For an explanation of the properties, see: http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html -->
        <!--datasource>
            <name>SAMPLE_DATA_SOURCE</name>
            <jndiConfig>
                <name></name>
                <environment>
                    <property name="java.naming.factory.initial"></property>
                    <property name="java.naming.provider.url"></property>
                </environment>
            </jndiConfig>
            <definition type="RDBMS">
                <configuration>

                    <defaultAutoCommit></defaultAutoCommit>
                    <defaultReadOnly></defaultReadOnly>
                    <defaultTransactionIsolation>NONE|READ_COMMITTED|READ_UNCOMMITTED|REPEATABLE_READ|SERIALIZABLE</defaultTransactionIsolation>
                    <defaultCatalog></defaultCatalog>
                    <username></username>
                    <password svns:secretAlias="WSO2.DB.Password"></password>
                    <maxActive></maxActive>
                    <maxIdle></maxIdle>
                    <initialSize></initialSize>
                    <maxWait></maxWait>

                    <dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
                    <dataSourceProps>
                        <property name="url">jdbc:mysql://localhost:3306/Test1</property>
                        <property name="user">root</property>
                        <property name="password">123</property>
                    </dataSourceProps>

                </configuration>
            </definition>
        </datasource-->

    </datasources>

</datasources-configuration>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to