|
24 | 24 | import org.hibernate.cache.spi.access.SoftLock; |
25 | 25 | import org.hibernate.collection.spi.CollectionSemantics; |
26 | 26 | import org.hibernate.collection.spi.PersistentCollection; |
27 | | -import org.hibernate.engine.internal.PersistenceContexts; |
28 | 27 | import org.hibernate.engine.spi.CollectionEntry; |
29 | 28 | import org.hibernate.engine.spi.EffectiveEntityGraph; |
30 | 29 | import org.hibernate.engine.spi.EntityHolder; |
|
85 | 84 |
|
86 | 85 | import static org.hibernate.engine.internal.ManagedTypeHelper.asPersistentAttributeInterceptable; |
87 | 86 | import static org.hibernate.engine.internal.ManagedTypeHelper.isPersistentAttributeInterceptable; |
| 87 | +import static org.hibernate.engine.internal.PersistenceContexts.createPersistenceContext; |
88 | 88 | import static org.hibernate.engine.internal.Versioning.incrementVersion; |
89 | 89 | import static org.hibernate.engine.internal.Versioning.seedVersion; |
90 | 90 | import static org.hibernate.engine.internal.Versioning.setVersion; |
@@ -134,10 +134,12 @@ public class StatelessSessionImpl extends AbstractSharedSessionContract implemen |
134 | 134 | public StatelessSessionImpl(SessionFactoryImpl factory, SessionCreationOptions options) { |
135 | 135 | super( factory, options ); |
136 | 136 | connectionProvided = options.getConnection() != null; |
137 | | - temporaryPersistenceContext = PersistenceContexts.createPersistenceContext( this ); |
| 137 | + temporaryPersistenceContext = createPersistenceContext( this ); |
138 | 138 | influencers = new LoadQueryInfluencers( getFactory() ); |
139 | 139 | eventListenerGroups = factory.getEventListenerGroups(); |
140 | 140 | setUpMultitenancy( factory, influencers ); |
| 141 | + // a nonzero batch size forces use of write-behind |
| 142 | + // therefore ignore the value of hibernate.jdbc.batch_size |
141 | 143 | setJdbcBatchSize( 0 ); |
142 | 144 | } |
143 | 145 |
|
|
0 commit comments