This content has been marked as final. 
    
Show                 2 replies
    
- 
        1. Re: Problem with cache config in unit testsdamianharvey Oct 31, 2007 5:47 AM (in response to endremr)How are you creating your EntityManager in your unit tests? Are you able to just create a separate persistence-unit for your tests? 
 Cheers,
 Damian.
- 
        2. Re: Problem with cache config in unit testsendremr Oct 31, 2007 6:03 AM (in response to endremr)Sorry for that missing info... 
 I use both unit tests where I create my components myself, but I also use FacesRequest tests where the EM's is injected automatically.
 My embedded EM's are configured in "embedded-jboss-beans.xml":<bean name="NewsAdminSesamNoDSBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="driverClass">org.hsqldb.jdbcDriver</property> <property name="connectionURL">jdbc:hsqldb:.</property> <property name="userName">sa</property> <property name="jndiName">java:/NewsAdminSesamNoDS</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="NewsAdminSesamNoDS" class="java.lang.Object"> <constructor factoryMethod="getDatasource"> <factory bean="NewsAdminSesamNoDSBootstrap"/> </constructor> </bean> 
 I thought that this was the thing that created my entity managers, but the properties in "persistence.xml" is also used, and this triggers the tree cache connection.
 
    