Hi, I've implemented a new data source implementation, which was added to the Carbon Core. It was added to Carbon Core because, this functionality is to be used by registry / user manager in looking up data sources using JNDI. Following are the improvements over the older implementation.
* The connection pooling implementation has been changed to jdbc-pool, from DBCP, all of jdbc-pool properties are supported, see [1]. * Carbon Secure Vault support. * Encryption of password fields etc.. when persisting data sources in the registry. * Database provider given DataSource support, i.e. that implements javax.sql.DataSource, javax.sql.XADataSource, for example if someone need to use Oracle supplied poolable DataSource implementation, it is possible to do so, and also required for creating data sources to be used in distributed transactions. * Automatic sync of data sources in a clustered environment using the coordination component. * Pluggable data source types, so other than RDBMS data sources can be registered using this (for in-memory, JNDI access). The earlier datasources.properties like functionality is now given using a separate directory for defining data source, at /repository/conf/datasources/. Inside it, it has a single file master-datasources.xml that is coming from Carbon Core. It contains the data source definition for registry/user-manager database. A single file can contain multiple data sources. If need to add more data sources, also a new file with the pattern *-datasources.xml can be created, and they will be loaded. This was done for products to easily add data sources, for example, bps-datasources.xml separately, without maintaining one global data sources file, which means, it has to maintain data sources used in Carbon Core in their product. A UI has not been yet created for this, it will be added when the product releases are done. I've simply tested the functionality by manually calling the admin service. I was told that the registry support looking up data sources using JNDI, but I couldn't find the configuration element that is used to do it. Senaka, please add the necessary settings for registry.xml, the JNDI name to use is "jdbc/WSO2CarbonDB", which is mentioned in master-datasources.xml. Also, the places that contain DBCP code, please migrate the code to the new implementation, an RDBMS data source can be directly created using the class "org.wso2.carbon.ndatasource.rdbms.RDBMSDataSource". [1] http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html Cheers, Anjana. -- *Anjana Fernando* Associate Technical Lead WSO2 Inc. | http://wso2.com lean . enterprise . middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
