Jasypt Users Forum

How to use Jasypt with Torque

View: New views
1 Messages — Rating Filter:   Alert me  

How to use Jasypt with Torque

by Jaya Nagdev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I was using simple property configuration with Torque. See the example below:

             String confFilePath = "file path";
        Configuration conf = new PropertiesConfiguration(confFilePath);
        Torque.getInstance().init(conf);

Torque class is org.apache.torque.Torque
Configuration is org.apache.commons.configuration.Configuration;
PropertiesConfiguration is org.apache.commons.configuration.PropertiesConfiguration

After initializing torque we can retrive the database connection from torque, by accessing
java.sql.Connection conn = Transaction.beginOptional(Torque.getDatabaseMap().getName(), true);

Now, my question is how can i use the jasypt over here?
I do know how to use StandardPBEStringEncryptor & EncryptableProperties.
But how to use the jasypt with Torque ??
What is the equivalent of PropertiesConfiguration in jasypt ??
What should i pass / which object should i pass to Torque.getInstance().init() method ??

Kindly reply/comment on the same. Thanks, Jaya