[
https://issues.apache.org/jira/browse/SYNAPSE-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581877#action_12581877
]
indika priyantha kumara commented on SYNAPSE-233:
-------------------------------------------------
Now it is possible to registry any data base as a data source in the JNDI
context and then lookup it in anywhere , without recreating data source each
time. Data source has to be configured through synapse.propeties file . I
have upload a sample (363) for check this functionality . In that sample, there
are two different data sources and one is shared between two separate DB
mediator instances (lookup/ report). One data source is a type of
BasicBatasoue whereas other is a type of PerUserPoolDataSource.
To run the sample , it is need to add following properties to
synapse.properties file
synapse.datasources =lookupds,reportds
synapse.datasources.icFactory=com.sun.jndi.rmi.registry.RegistryContextFactory
synapse.datasources.providerUrl=rmi://localhost:2199
synapse.datasources.providerPort=2199
synapse.datasources.lookupds.type =BasicDataSource
synapse.datasources.lookupds.dsName=lookupdb
synapse.datasources.lookupds.driverClassName=org.apache.derby.jdbc.ClientDriver
synapse.datasources.lookupds.url=jdbc:derby://localhost:1527/lookupdb;create=false
synapse.datasources.lookupds.username=synapse
synapse.datasources.lookupds.password=synapse
synapse.datasources.lookupds.maxActive=100
synapse.datasources.lookupds.maxIdle=20
synapse.datasources.lookupds.maxWait=10000
synapse.datasources.reportds.type =PerUserPoolDataSource
synapse.datasources.lookupds.cpdsadapter.factory=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
synapse.datasources.lookupds.cpdsadapter.className=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
synapse.datasources.lookupds.cpdsadapter.name=cpds
synapse.datasources.reportds.dsName=reportdb
synapse.datasources.reportds.driverClassName=org.apache.derby.jdbc.ClientDriver
synapse.datasources.reportds.url=jdbc:derby://localhost:1527/reportdb;create=false
synapse.datasources.reportds.username=synapse
synapse.datasources.reportds.password=synapse
Thanks
Indika
> Support definition of re-usable database connection pools for DB mediators
> --------------------------------------------------------------------------
>
> Key: SYNAPSE-233
> URL: https://issues.apache.org/jira/browse/SYNAPSE-233
> Project: Synapse
> Issue Type: Improvement
> Reporter: Asankha C. Perera
> Assignee: indika priyantha kumara
> Fix For: 1.2
>
>
> Instead of defining a new pool for use by each mediator, it would be better
> to allow common pools to be defined for use by Synapse and make them
> available as data sources for the mediators
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]