|
37 | 37 | import org.hibernate.type.TypeResolver; |
38 | 38 | import org.hibernate.type.descriptor.java.spi.JavaTypeDescriptorRegistry; |
39 | 39 | import org.hibernate.type.descriptor.sql.spi.SqlTypeDescriptorRegistry; |
40 | | -import org.hibernate.type.internal.TypeConfigurationRegistry; |
41 | 40 |
|
42 | 41 | import static org.hibernate.internal.CoreLogging.messageLogger; |
43 | 42 |
|
@@ -88,8 +87,6 @@ public TypeConfiguration() { |
88 | 87 | this.basicTypeRegistry = new BasicTypeRegistry(); |
89 | 88 | this.typeFactory = new TypeFactory( this ); |
90 | 89 | this.typeResolver = new TypeResolver( this, typeFactory ); |
91 | | - |
92 | | - TypeConfigurationRegistry.INSTANCE.registerTypeConfiguration( this ); |
93 | 90 | } |
94 | 91 |
|
95 | 92 | public String getUuid() { |
@@ -210,8 +207,6 @@ public void sessionFactoryCreated(SessionFactory factory) { |
210 | 207 | public void sessionFactoryClosed(SessionFactory factory) { |
211 | 208 | log.tracef( "Handling #sessionFactoryClosed from [%s] for TypeConfiguration", factory ); |
212 | 209 |
|
213 | | - TypeConfigurationRegistry.INSTANCE.deregisterTypeConfiguration( this ); |
214 | | - |
215 | 210 | scope.unsetSessionFactory( factory ); |
216 | 211 |
|
217 | 212 | // todo (6.0) : finish this |
@@ -374,12 +369,4 @@ private Object readResolve() throws InvalidObjectException { |
374 | 369 | } |
375 | 370 | } |
376 | 371 |
|
377 | | - |
378 | | - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
379 | | - // Custom serialization hook |
380 | | - |
381 | | - private Object readResolve() throws InvalidObjectException { |
382 | | - log.trace( "Resolving serialized TypeConfiguration - readResolve" ); |
383 | | - return TypeConfigurationRegistry.INSTANCE.findTypeConfiguration( getUuid() ); |
384 | | - } |
385 | 372 | } |
0 commit comments