GWT Spring & Hibernate Mavenized Crud Sample

Attached is the Mavenized Project which has sample CRUD operations

Tested Configuration

Using CATALINA_BASE: “C:\setup\Apache\apache-tomcat-6.0.26”
Using CATALINA_HOME: “C:\setup\Apache\apache-tomcat-6.0.26”
Using CATALINA_TMPDIR: “C:\setup\Apache\apache-tomcat-6.0.26\temp”
Using JRE_HOME: “C:\setup\java\jdk1.5.0_21”

Maven 2.2.1
GWT 1.7.1

Download this link extract using winrar
MavenizedSample

It has InstallMaven.txt which has command to install some thirdparty libraries
It has InstallDB.txt which has commoand to import Oracle Dump

Once the above configuration is done then Run
mvn clean package

This shall create war file as well as package in target folder. copy that deploy in tomcat.
For any questions
mail me at ashwin@linkwithweb.com

Spring Poolable Database Connection

<bean id=”cpmsDS” class=”org.springframework.jdbc.datasource.DriverManagerDataSource”>
<property name=”driverClassName”><value>your.driver.classname</value></property>
<property name=”url”><value>yourDatabaseUrl</value></property>
<property name=”username”><value>yourUsername</value></property>
<property name=”password”><value>yourPassword</value></property>
</bean>

<bean id=”pool” class=”org.apache.commons.pool.impl.GenericObjectPool”>
<property name=”minEvictableIdleTimeMillis”><value>300000</value></property>
<property name=”timeBetweenEvictionRunsMillis”><value>60000</value></property>
</bean>

<bean id=”dsConnectionFactory” class=”org.apache.commons.dbcp.DataSourceConnectionFactory”>
<constructor-arg><ref bean=”cpmsDS”/></constructor-arg>
</bean>

<bean id=”poolableConnectionFactory” class=”org.apache.commons.dbcp.PoolableConnectionFactory”>
<constructor-arg index=”0″><ref bean=”dsConnectionFactory”/></constructor-arg>
<constructor-arg index=”1″><ref bean=”pool”/></constructor-arg>
<constructor-arg index=”2″><null/></constructor-arg>
<constructor-arg index=”3″><null/></constructor-arg>
<constructor-arg index=”4″><value>false</value></constructor-arg>
<constructor-arg index=”5″><value>true</value></constructor-arg>
</bean>

<bean id=”pooledDS” class=”org.apache.commons.dbcp.PoolingDataSource” depends-on=”poolableConnectionFactory”>
<constructor-arg><ref bean=”pool”/></constructor-arg>
</bean>