Hi all,
I would be very thakful, if any one of you could come with a possible solution.
I am using JBoss-4.2.1
Here is the scenario.
I have two ear files in one
jboss instance.
A.ear file and B.ear file. And two Data Source files for each of the respective A,B ear files, pointing to same DataBase , but with diff DataSource names and diff user ids, diff JNDI names but with same passwords.
I encrypted the password for A.datasource.xml file and added that policy in login-config.xml. did the same with B.DataSource file(under conf directory). I restarted the jboss instance, but I am unable to connect to the database.
But if I revert the changes and use the same Data Source file without encrypting the Data source passwords I could connect to the Data Base.
What could be the possible reason for this??
<application-policy name="EncryptMODELPassword_A">
<authentication>
<login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
<module-option name="username">AAAAA</module-option>
<module-option name="password">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</module-option>
<module-option name="managedConnectionFactoryName">jboss.jca:name=ADatasource,service=LocalTxCM</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name="EncryptMODELPassword_B">
<authentication>
<login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
<module-option name="username">BBBBB</module-option>
<module-option name="password">xxxxxxxxxxxxxxxxxxxxxxxxxxx</module-option>
<module-option name="managedConnectionFactoryName">jboss.jca:name=BDatasource,service=LocalTxCM</module-option>
</login-module>
</authentication>
</application-policy>
Can we add two policies in same login-config.xml file?? I mean one below the other, with diff policy name as shown above?
Your help is greatly appreciated.Thanks in advance.