Hi,
Can anyone tell me if it is possible to reload a custom type definition without restarting the app server?
I am using Jasypt with Hibernate to encrypt data and we need to be able to update the encryption password / key periodically. however, when I try to do this, it still appears to use the old key.
From looking at this, it looks like Hibernate is using the instance of the type definition it first got when app server started up. What I am looking for is a mechanism of telling Hibernate to discard that instance and load the type definition again.
Does anybody know how to do this?
Thanks very much,
John
Hibernate version:
3.2.4.sp1
Mapping documents:
@org.hibernate.annotations.TypeDefs(
{
@org.hibernate.annotations.TypeDef(
name="encryptedString",
typeClass=org.jasypt.hibernate.type.EncryptedStringType.class,
parameters= {
@org.hibernate.annotations.Parameter(name="encryptorRegisteredName", value="strongHibernateStringEncryptor")
}
),
@org.hibernate.annotations.TypeDef(
name="encryptedBinary",
typeClass=org.jasypt.hibernate.type.EncryptedBinaryType.class,
parameters= {
@org.hibernate.annotations.Parameter(name="encryptorRegisteredName", value="strongHibernateBinaryEncryptor")
}
),
@org.hibernate.annotations.TypeDef(
name="encryptedBigInteger",
typeClass=org.jasypt.hibernate.type.EncryptedBigIntegerType.class,
parameters= {
@org.hibernate.annotations.Parameter(name="encryptorRegisteredName", value="strongHibernateBigIntegerEncryptor")
}
),
@org.hibernate.annotations.TypeDef(
name="encryptedBigDecimal",
typeClass=org.jasypt.hibernate.type.EncryptedBigDecimalAsStringType.class,
parameters= {
@org.hibernate.annotations.Parameter(name="encryptorRegisteredName", value="strongHibernateStringEncryptor"),
@org.hibernate.annotations.Parameter(name="decimalScale", value="2")
}
),
@org.hibernate.annotations.TypeDef(
name="encryptedBoolean",
typeClass=org.jasypt.hibernate.type.EncryptedBooleanAsStringType.class,
parameters= {
@org.hibernate.annotations.Parameter(name="encryptorRegisteredName", value="strongHibernateStringEncryptor")
}
),
@org.hibernate.annotations.TypeDef(
name="encryptedDate",
typeClass=org.jasypt.hibernate.type.EncryptedDateAsStringType.class,
parameters= {
@org.hibernate.annotations.Parameter(name="encryptorRegisteredName", value="strongHibernateStringEncryptor")
}
)
}
)
Name and version of the database you are using:
Oracle 10g
|