From: <tu...@us...> - 2006-02-25 13:00:50
|
Update of /cvsroot/hibernate/CaveatEmptor/HiA-SE/src/etc/conf/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5762/HiA-SE/src/etc/conf/META-INF Added Files: jboss-aop.xml jboss-beans.xml persistence.xml Log Message: Merged Seam and TestNG configuration --- NEW FILE: jboss-aop.xml --- <aop> <!-- Wrap all execute() methods in all Action implementors inside a database transaction and a thread-bound persistence context. If one execute() method should call another execute() method, both transaction and persistence context are propagated. --> <bind pointcut="execution(* $instanceof{org.hibernate.ce.auction.web.actions.Action}->execute(..))"> <interceptor class="org.hibernate.ce.auction.persistence.TransactionInterceptor"/> </bind> </aop> --- NEW FILE: jboss-beans.xml --- <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer:2.0"> <!-- Enable a JCA datasource available through JNDI--> <bean name="caveatemptorDataSourceFactory" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="jndiName">java:/caveatemptorDatasource</property> <!-- MySQL <property name="driverClass">com.mysql.jdbc.Driver</property> <property name="connectionURL">jdbc:mysql://localhost/test</property> <property name="userName">test</property> <property name="password">test</property> --> <!-- HSQL DB --> <property name="driverClass">org.hsqldb.jdbcDriver</property> <property name="connectionURL">jdbc:hsqldb:hsql://localhost</property> <property name="userName">sa</property> <property name="minSize">0</property> <property name="maxSize">10</property> <property name="blockingTimeout">1000</property> <property name="idleTimeout">100000</property> <property name="transactionManager"><inject bean="TransactionManager"/></property> <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property> <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property> </bean> <bean name="caveatemptorDatasource" class="java.lang.Object"> <constructor factoryMethod="getDatasource"> <factory bean="caveatemptorDataSourceFactory"/> </constructor> </bean> <!-- You can setup and wire other stateless POJO services here... --> </deployment> --- NEW FILE: persistence.xml --- <?xml version="1.0" encoding="UTF-8"?> <persistence> <!-- For use in an EJB 3.0 container with managed EntityManagers --> <persistence-unit name="caveatemptorDatabase"> <jta-data-source>java:/caveatemptorDatasource</jta-data-source> <properties> <!-- Only use annotations, don't read .hbm.xml (use "class, hbm")--> <property name="hibernate.archive.autodetection" value="class"/> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> <property name="hibernate.hbm2ddl.auto" value="create"/> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/> <property name="hibernate.cache.use_second_level_cache" value="false"/> <property name="hibernate.cache.use_query_cache" value="false"/> <property name="hibernate.jdbc.batch_size" value="0"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hibernate.comment_sql" value="true"/> </properties> </persistence-unit> <!-- TODO: Bug in JBoss EJB3... For use with standalone JSE applications <persistence-unit name="caveatemptorLocalDatabase" transaction-type="RESOURCE_LOCAL"> <properties> <property name="hibernate.ejb.cfgfile" value="/hibernate.cfg.xml"/> Don't autodetect anything, classes are listed in hibernate.cfg.xml <property name="hibernate.archive.autodetection" value="none"/> </properties> </persistence-unit> --> </persistence> |