Re: ReplicationDriver & PreparedStatement
Posted by: david TENTE
Date: September 13, 2012 09:42AM

Here is my Spring config I also define A dataSourceTransactionManager for each datasources

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.ReplicationDriver" />
<property name="url" value="jdbc:mysql://master:ip,slave:ip/databaseName" />
<property name="username" value="root" />
<property name="password" value="password" />
</bean>

<bean id="logDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://ip:port/dataBaseLogName" />
<property name="username" value="root" />
<property name="password" value="password" />
</bean>

Options: ReplyQuote


Subject
Written By
Posted
Re: ReplicationDriver & PreparedStatement
September 13, 2012 09:42AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.