Hi,

How can we set *autoCommit* value in a* global configuration for a
secondary custom user store database* ?

Following are some of our findings about user store database handling
related implementation

   - When we analyze  getDBConnection() method in org.wso2.carbon.user.core.
   jdbc.JDBCUserStoreManager, we observed that from the source level,
   carbon-identity has made *default autocommit value *to* false*.


   - WSO2 IS has enabled us to add custom database related properties to
   
<IS_HOME>/repository/deployment/server/userstores/<secondary_user_store_name>.xml.
      - createUserStoreDataSource(RealmConfiguration realmConfig) method in
      JDBCUserStoreManager is the place where secondary user store
      configuration file is read and datasource connection pool is configured.
      - In above method, url, userName, password, maxActive, minIdle,
      maxIdle, maxWait,
      testWhileIdle, timeBetweenEvictionRunsMillis, minEvictableIdleTimeMillis,
      validationQuery are the only properties which users are allowed to
      configure for secondary user store database as per WSO2 IS 5.0.0
      - *autocommit property was not included among configurable propertie*s
      in createUserStoreDataSource method
   - Even though we can set *defaultAutoCommit property* from configuration
   xml file, due to above reasons, that property *gets overridden to false
   all the time*.
   - Therefore changing autocommit settings from custom user store
source (AbstractCustomUserStoreManager.java
   class) could be identified as a solution.

Is there an approach we can enable/disable autocommit for a secondary
custom user store database using a configuration file other than editing
user store source?

Thanks.

-- 
Best Regards,

*Thilini Cooray*
Software Engineer
Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20773%20451194>
E-mail : thili...@wso2.com

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to