Skip to content

Commit

Permalink
More annotations and SPIs moved
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Feb 21, 2023
1 parent 4884a03 commit b2cddcc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
import org.hibernate.boot.spi.MetadataBuilderImplementor;
import org.hibernate.cache.internal.CollectionCacheInvalidator;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.beanvalidation.BeanValidationIntegrator;
import org.hibernate.boot.beanvalidation.BeanValidationIntegrator;
import org.hibernate.dialect.Dialect;
import org.hibernate.engine.jdbc.connections.spi.MultiTenantConnectionProvider;
import org.hibernate.engine.jdbc.dialect.spi.DialectFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl;
import org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorBuilderImpl;
import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder;
import org.hibernate.type.FormatMapper;
import org.hibernate.type.jackson.JacksonJsonFormatMapper;
import org.hibernate.type.jackson.JacksonXmlFormatMapper;
import org.hibernate.type.jakartajson.JsonBJsonFormatMapper;
import org.hibernate.type.jaxb.JaxbXmlFormatMapper;
import org.hibernate.type.format.FormatMapper;
import org.hibernate.type.format.jackson.JacksonJsonFormatMapper;
import org.hibernate.type.format.jackson.JacksonXmlFormatMapper;
import org.hibernate.type.format.jakartajson.JsonBJsonFormatMapper;
import org.hibernate.type.format.jaxb.JaxbXmlFormatMapper;

/**
* Similar to {@link org.hibernate.boot.registry.selector.internal.StrategySelectorBuilder} but
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.hibernate.boot.spi.BootstrapContext;
import org.hibernate.boot.spi.MetadataBuildingOptions;
import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.cfg.annotations.NamedEntityGraphDefinition;
import org.hibernate.boot.model.NamedEntityGraphDefinition;
import org.hibernate.engine.spi.FilterDefinition;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.mapping.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static JTASessionOpener create(SessionFactory sessionFactory) {
}
}

private static SessionBuilder<?> createOptions(SessionFactory sessionFactory) {
private static SessionBuilder createOptions(SessionFactory sessionFactory) {
return sessionFactory.withOptions()
.autoClose(true) // .owner() is deprecated as well, so it looks like we need to rely on deprecated code...
.connectionHandlingMode(
Expand All @@ -36,15 +36,15 @@ private static SessionBuilder<?> createOptions(SessionFactory sessionFactory) {
}

private final SessionFactory sessionFactory;
private final SessionBuilder<?> cachedOptions;
private final SessionBuilder cachedOptions;

public JTASessionOpener(SessionFactory sessionFactory, SessionBuilder<?> cachedOptions) {
public JTASessionOpener(SessionFactory sessionFactory, SessionBuilder cachedOptions) {
this.sessionFactory = sessionFactory;
this.cachedOptions = cachedOptions;
}

public Session openSession() {
SessionBuilder<?> options = cachedOptions != null ? cachedOptions : createOptions(sessionFactory);
SessionBuilder options = cachedOptions != null ? cachedOptions : createOptions(sessionFactory);
return options.openSession();
}
}

0 comments on commit b2cddcc

Please sign in to comment.