priweb
Mar 1st, 2006, 09:47 AM
What is the use of the dependency setter injection ?
In a database driven app, I retrieve results, use the javabeans set methods to save stuff in javabeans and then call get on it.
What is the use of having something set externally from a xml already ?
Can someone provide an example when the setter injection can be used?
I wouldnt imaginge using it to get usernames, passwords, databaseurl because we use JNDI for that...
Is the dependency setter meant as something additional to web.xml so you dont have to get params from web.xml?
In a database driven app, I retrieve results, use the javabeans set methods to save stuff in javabeans and then call get on it.
What is the use of having something set externally from a xml already ?
Can someone provide an example when the setter injection can be used?
I wouldnt imaginge using it to get usernames, passwords, databaseurl because we use JNDI for that...
Is the dependency setter meant as something additional to web.xml so you dont have to get params from web.xml?