/** * Builds a new {@link EventSchema} from builder values. * * @return new EventSchema */ public EventSchema build() { return new EventSchema(this); } }
@Before public void setUp() { testSubject = new Oracle11EventTableFactory(); eventSchema = new EventSchema(); try { connection = DriverManager.getConnection("jdbc:oracle:thin:@//localhost:1521/xe", "system", "oracle"); } catch (SQLException e) { assumeNoException("Ignoring test. Machine does not have a local Oracle 11 instance running", e); } }
/** * Builds a new {@link EventSchema} from builder values. * * @return new EventSchema */ public EventSchema build() { return new EventSchema(this); } }
/** * Builds a new {@link EventSchema} from builder values. * * @return new EventSchema */ public EventSchema build() { return new EventSchema(this); } }
/** * Initializes an EventStorageEngine that uses JDBC to store and load events using the default {@link EventSchema}. * The payload and metadata of events is stored as a serialized blob of bytes using a new {@link XStreamSerializer}. * <p> * Events are read in batches of 100. No upcasting is performed after the events have been fetched. * * @param connectionProvider The provider of connections to the underlying database. * @param transactionManager The instance managing transactions around fetching event data. Required by certain * databases for reading blob data. */ public JdbcEventStorageEngine(ConnectionProvider connectionProvider, TransactionManager transactionManager) { this(null, null, null, null, null, connectionProvider, transactionManager, byte[].class, new EventSchema(), null, null); }
@Bean public EventSchema eventSchema() { return new EventSchema(); }
/** * Initializes an EventStorageEngine that uses JDBC to store and load events using the default {@link EventSchema}. * The payload and metadata of events is stored as a serialized blob of bytes using the given {@code serializer}. * <p> * Events are read in batches of 100. The given {@code upcasterChain} is used to upcast events before * deserialization. * * @param snapshotSerializer Used to serialize and deserialize snapshots. * @param upcasterChain Allows older revisions of serialized objects to be deserialized. * @param persistenceExceptionResolver Detects concurrency exceptions from the backing database. If {@code null} * persistence exceptions are not explicitly resolved. * @param eventSerializer Used to serialize and deserialize event payload and metadata. * @param connectionProvider The provider of connections to the underlying database. * @param transactionManager The instance managing transactions around fetching event data. Required by * certain databases for reading blob data. */ public JdbcEventStorageEngine(Serializer snapshotSerializer, EventUpcaster upcasterChain, PersistenceExceptionResolver persistenceExceptionResolver, Serializer eventSerializer, ConnectionProvider connectionProvider, TransactionManager transactionManager) { this(snapshotSerializer, upcasterChain, persistenceExceptionResolver, eventSerializer, null, connectionProvider, transactionManager, byte[].class, new EventSchema(), null, null); }