I have a datasource in tomcat which has password that is encrypted using some algorithm and I want to decrypt the same when i establish connection with DB.
Following is my spring config code
<!--<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="${jdbc.jndiName}"/>
</bean>-->
<bean id="dataSource" class="my.app.util.EncryptedDataSource">
<property name="jndiName" value="${jdbc.jndiName}"/>
</bean>
The above bean is a custom one that extends the JndiObjectFactoryBean
public class EncryptedDataSource extends JndiObjectFactoryBean{ ... }
What should I do here to get the encryted password and set it back. I have my decrytion algorithm with me but I am not sure which super class method will fetch me the password that i can set back again.
Please suggest, i have search and tried a lot.