Spring JNDI Datasource and Development Datasource


<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
		<property name="jndiName" value="com/dev/sss" />
		<property name="defaultObject" ref="developmentDataSource" />
	</bean>

	<!-- fall back datasource if JNDI look up of main datasource fails -->
	<bean id="developmentDataSource" class="org.apache.commons.dbcp.BasicDataSource"
		destroy-method="close">

		<property name="driverClassName" value="${jdbc.driverClassName}" />
		<property name="url" value="${jdbc.url}" />
		<property name="username" value="${jdbc.username}" />
		<property name="password" value="${jdbc.password}" />

		<property name="initialSize">
			<value>10</value>
		</property>
		<property name="maxActive">
			<value>0</value>
		</property>
		<property name="maxWait">
			<value>5000</value>
		</property>

	</bean>
Advertisements

Setting Mysql Data Source in Websphere


http://edivad.wordpress.com/2007/07/18/websphere-and-mysql-datasource/
http://www.webspherepower.com/issues/issue200403/00001236001
http://jefferyhaynes.net/2009/11/29/websphere-hibernate-datasource-configuration-for-mysql/

NB: dont forget to set custom properties for database info