I'd like to know if it's possible to share a database connection pool bean (set up by Spring) and share it between two WARs that are deployed in JBoss.
For example, I'd like something like this: database-pool.xml
<bean id="datasource" class="com.mchange.v2.c3p0.ComboPooledDataSource"/>
WAR app1's applicationContext.xml:
<import resource="database-pool.xml"/>
<bean id="someBean1">
<property name="datasource" ref="datasource"/>
</bean>
WAR app2's applicationContext.xml:
<import resource="database-pool.xml"/>
<bean id="someBean2">
<property name="datasource" ref="datasource"/>
</bean>
My ultimate goal here is to have a single instance of the database connection pool. Is that feasible?