con schrieb:
The only problem i am having is that i have to set the database parameters including the username and password in the data-config.xml.
I think this can be solved by using the db configurations that is defined in the spring configs.
can i externalise these parameters from the data-config.xml, so that i can encrypt the password.
A JNDI DataSource is probably the best solution, but if the relevant part of your spring configuration in XML, then there is also the XML way of sharing by using an external entity, like this: m...@lobster:~/funkuhr > cat eins.xml <!DOCTYPE Eins [ <!ENTITY cred SYSTEM "cred.ent" > ]> <Eins> &cred; </Eins> m...@lobster:~/funkuhr > cat zwei.xml <!DOCTYPE Zwei [ <!ENTITY cred SYSTEM "cred.ent" > ]> <Zwei> &cred; </Zwei> m...@lobster:~/funkuhr > cat cred.ent <User>ich</User> <Password>geheim</Password> m...@lobster:~/funkuhr > xmllint --noent eins.xml <?xml version="1.0"?> <!DOCTYPE Eins [ <!ENTITY cred SYSTEM "cred.ent"> ]> <Eins> <User>ich</User> <Password>geheim</Password> </Eins> m...@lobster:~/funkuhr > xmllint --noent zwei.xml <?xml version="1.0"?> <!DOCTYPE Zwei [ <!ENTITY cred SYSTEM "cred.ent"> ]> <Zwei> <User>ich</User> <Password>geheim</Password> </Zwei> But that doesn't address the encryption issue. Michael Ludwig