These are just the class annotations of our persistent objects because our Application is to complex for an easy example.
Code:
@Entity(name = BEAN_NAME_AttributeDefinition)
@Table(name = TABLE_NAME_AttributeDefinition)
@PrimaryKeyJoinColumn(name = OID_COLUMN_REF)
@Proxy(lazy = true, proxyClass = AttributeDefinitionProxy.class)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AttributeDefinitionHb extends NameableAccessControlledObjectHb implements AttributeDefinitionProxy {
....
}
Code:
@Entity(name = BEAN_NAME_NameableAccessControlledObject)
@Table(name = TABLE_NAME_NameableAccessControlledObject)
@PrimaryKeyJoinColumn(name = OID_COLUMN_REF)
@Proxy(lazy = true, proxyClass = NameableAccessControlledObjectProxy.class)
public class NameableAccessControlledObjectHb extends NameableHb implements NameableAccessControlledObjectProxy {
....
}
Code:
@Entity(name = BEAN_NAME_Nameable)
@Table(name = TABLE_NAME_Nameable,
uniqueConstraints = {
@UniqueConstraint(
columnNames = {IDENTIFICATION_NAME, NAMESPACE_OID }
)
})
@Inheritance(strategy = InheritanceType.JOINED)
@Proxy(lazy = true, proxyClass = NameableProxy.class)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class NameableHb extends IdentifiableHb implements NameableProxy {
....
}
Code:
@MappedSuperclass
public abstract class IdentifiableHb extends PersistentHb implements IdentifiableProxy, Serializable {
.....
}
If we remove the proxyClass attribute of the @proxy annotation, which was necessary in allmost every position in the old version when you have to use it in one place, the performance is much better.