Seeing those 3 files, I got the conclusion that:
1) This application uses JPA and Hibernate as a provider?!
2) The connection pool is controlled by tomcat(context.xml)?!
3) What about the transactions? Is Seamframework container controlling transactions here? or there's no transaction controller!?
4) If 2) is true, what if I want to swap that connection pool for hibernate's C3PO, how much would be the impact of this change?
((( components.xml )))
<persistence:entity-manager-factory name="entityManagerFactory" persistence-unit-name="sampleDatabase" />
<persistence:managed-persistence-context entity-manager-factory="#{entityManagerFactory}" name="entityManager" />
<factory auto-create="true" name="hibernateSession" value="#{entityManager.delegate}" />
<transaction:entity-transaction entity-manager="#{entityManager}" />
((( persistence.xml )))
<persistence-unit name="sampleDatabase">
<non-jta-data-source>java:comp/env/sampleDatasource</non-jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
<property name="hibernate.jdbc.batch_size" value="20"/>
<property name="hibernate.connection.provider_class" value="com.sample.util.RoleProvider" />
</properties>
</persistence-unit>
((( context.xml )))
<Resource auth="Container"
name="sampleDatasource"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
maxActive="2"
maxIdle="1"
username="sample"
password="sample"
url="jdbc:oracle:thin:@myserver:1521:DESENV" />