Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL Cluster (Master/Slave) and Hibernate
    text
    copied!<p>The application when developed is using a single database and the spring configuration is as follows.</p> <pre><code>&lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt; &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt; &lt;property name="url" value="jdbc:mysql://localhost:3306/test" /&gt; &lt;property name="username" value="root" /&gt; &lt;property name="password" value="" /&gt; &lt;/bean&gt; &lt;bean id="hibernateProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"&gt; &lt;property name="properties"&gt; &lt;props&gt; &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt; &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt; ... &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt; &lt;property name="dataSource"&gt; &lt;ref local="dataSource" /&gt; &lt;/property&gt; &lt;property name="hibernateProperties"&gt; &lt;ref bean="hibernateProperties" /&gt; &lt;/property&gt; &lt;property name="mappingResources"&gt; &lt;list&gt; &lt;value&gt;...&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; &lt;bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt; &lt;property name="dataSource" ref="dataSource" /&gt; &lt;property name="sessionFactory" ref="sessionFactory" /&gt; &lt;/bean&gt; </code></pre> <p>However for production there is a chance that either MySQL clustering or Master/Slave replication will be used. Any idea about the code/configuration changes for this ?</p> <p>Also a quick question to all - How much transactions/sec a single mysql server instance running on a dedicated server can handle ?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload