@Component(value="blMaterializedClobTypeClassTransformer") public class MaterializedClobTypeClassTransformer extends Object implements BroadleafClassTransformer
StringClobType. This has been deprecated in favor of
MaterializedClobType. However, this is not a panacea, as this can map to the wrong type for Postgres. However,
this mapping is correct for Oracle.
The main reason to switch to MaterializedClobType is because it avoids the use of rs.getCharacterStream on the clob column.
Opening the character stream causes the Oracle jdbc driver to allocate a very large buffer array, which contributes to
wasteful short-term memory allocation.
Hibernate 5.2 completely removed the org.hibernate.type.StringClobType that was used in all {literal @}Lob fields within Broadleaf. In order to improve forwards-compatiblity, this finds any instances in entities that were using StringClobType for @Lob @Type and swaps it out with org.hibernate.type.MaterializedClobType
| Modifier and Type | Field and Description |
|---|---|
protected List<DirectCopyIgnorePattern> |
ignorePatterns |
| Constructor and Description |
|---|
MaterializedClobTypeClassTransformer() |
| Modifier and Type | Method and Description |
|---|---|
void |
compileJPAProperties(Properties properties,
Object o) |
protected boolean |
containsTypeLevelPersistenceAnnotation(javassist.bytecode.annotation.Annotation[] annotations) |
protected boolean |
isIgnored(String convertedClassName) |
byte[] |
transform(ClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer) |
protected List<DirectCopyIgnorePattern> ignorePatterns
public MaterializedClobTypeClassTransformer()
public void compileJPAProperties(Properties properties, Object o) throws Exception
compileJPAProperties in interface BroadleafClassTransformerExceptionpublic byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
transform in interface javax.persistence.spi.ClassTransformerIllegalClassFormatExceptionprotected boolean isIgnored(String convertedClassName)
protected boolean containsTypeLevelPersistenceAnnotation(javassist.bytecode.annotation.Annotation[] annotations)
Copyright © 2024. All rights reserved.