@ConditionalOnMissingBean({DataSource.class, PersistenceExceptionResolver.class, EventStore.class}) @Bean public PersistenceExceptionResolver jdbcSQLErrorCodesResolver() { return new JdbcSQLErrorCodesResolver(); }
@Override public boolean isDuplicateKeyViolation(Exception exception) { return causeIsEntityExistsException(exception); }
private Builder() { persistenceExceptionResolver(new JdbcSQLErrorCodesResolver()); }
private boolean causeIsEntityExistsException(Throwable exception) { return exception instanceof java.sql.SQLIntegrityConstraintViolationException || (exception.getCause() != null && causeIsEntityExistsException(exception.getCause())); }
@ConditionalOnMissingBean({DataSource.class, PersistenceExceptionResolver.class, EventStore.class}) @Bean public PersistenceExceptionResolver jdbcSQLErrorCodesResolver() { return new JdbcSQLErrorCodesResolver(); }
@Override public boolean isDuplicateKeyViolation(Exception exception) { return causeIsEntityExistsException(exception); }
private Builder() { persistenceExceptionResolver(new JdbcSQLErrorCodesResolver()); }
@Override public boolean isDuplicateKeyViolation(Exception exception) { return causeIsEntityExistsException(exception); }
this( snapshotSerializer, upcasterChain, getOrDefault(persistenceExceptionResolver, new JdbcSQLErrorCodesResolver()), eventSerializer, snapshotFilter, batchSize, connectionProvider, transactionManager, dataType, schema, maxGapOffset, lowestGlobalSequence, DEFAULT_EXTENDED_GAP_CHECK_ENABLED Long lowestGlobalSequence, boolean extendedGapCheckEnabled) { super(snapshotSerializer, upcasterChain, getOrDefault(persistenceExceptionResolver, new JdbcSQLErrorCodesResolver()), eventSerializer, snapshotFilter, batchSize); this.connectionProvider = connectionProvider;
private boolean causeIsEntityExistsException(Throwable exception) { return exception instanceof java.sql.SQLIntegrityConstraintViolationException || (exception.getCause() != null && causeIsEntityExistsException(exception.getCause())); }
private boolean causeIsEntityExistsException(Throwable exception) { return exception instanceof java.sql.SQLIntegrityConstraintViolationException || (exception.getCause() != null && causeIsEntityExistsException(exception.getCause())); }