openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Encryption and Decryption
Date Fri, 08 Jul 2011 00:50:45 GMT
An alternative suggestion to Kevin's solution via callbacks for
encryption/decryption is the following:

OpenJPA can annotate any persistent property p with an @Externalizer. The
application supplies the function that can encode/decode value of p to
another value suitable for database stoarge. For example, one can declare a
field such as
  private website;

and make the URL be stored as a string (VARCHAR) in the database. 

So, encryption/decryption of specific persistent field can be achieved via
@Externalizer which perhaps will change a String value to an encrypted
String value. 

See the documentation and examples [1].


View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message