public class QuickJPAStoreRecoveryBrokerTest extends RecoveryBrokerTest {
protected BrokerService createBroker() throws Exception {
BrokerService service = new BrokerService();
service.setDeleteAllMessagesOnStartup(true);
AMQPersistenceAdapter pa = new AMQPersistenceAdapter();
JPAReferenceStoreAdapter rfa = new JPAReferenceStoreAdapter();
Properties props = new Properties();
props.setProperty("openjpa.ConnectionDriverName", "org.apache.derby.jdbc.EmbeddedDriver");
props.setProperty("openjpa.ConnectionURL", "jdbc:derby:activemq-data/derby;create=true");
props.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema");
// props.setProperty("openjpa.Log", "DefaultLevel=WARN,SQL=TRACE");
rfa.setEntityManagerProperties(props);
pa.setReferenceStoreAdapter(rfa);
service.setPersistenceAdapter(pa);
return service;
}