Reputation: 203
I want to store password in encrypted format so it is not readable for other user. my tomee.xml
file contains
<Resource id="jdbc/myrootdb" type="DataSource">
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/test
UserName root
Password root
JtaManaged false
InitialSize 50
MaxActive 10
MaxIdle 3
</Resource>
I am using apache-tomee-jaxrs-1.5.2.
Upvotes: 4
Views: 1988
Reputation: 11
<OpenEJB install path>/bin
and execute the commandopenejb cipher root
DataSourceCreator dbcp
PasswordCipher Static3DES
For more information see: http://openejb.apache.org/datasource-password-encryption.html
Upvotes: 1
Reputation: 17903
The <Resource>
in Tomcat has an attribute called factory
. Here you specify a datasource factory. For encrypted password you need a custom datasource factory which reads the encrypted password. Here is what you need
For more details, please check out this very detailed step by step example for achieving the same.
Upvotes: 2