<bean id="jndiDataSource"
class="org.springframework.jndi.JndiObjectFactoryBean"
abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
<property name="jndiName">
<value>java:comp/env/XXXX</value>
</property>
</bean>