
Originally Posted by
bosh
As the title says i am a beginner so excuse me if u use the wroung terminology, etc.
<bean id="parseXML" class="com.scientia.busdir.xmlparsing.ParseXML">
<property name="primaryDescriptionDAO">
<ref local="primaryDescriptionDAO"/>
</property>
</bean>
Bascially i have a parseXML bean and i want it to be able to access the primaryDescriptionDAO, i believe i have set this relationship up correctly in the above xml?
Yes 
What i need to know it how do i now access the primaryDescriptionDAO bean from my parseXML code? Could someone provide me with a code snippet.
Just like any property you have set in the past.
Code:
class ParseXML{
private PrimaryDescriptionDAO dao;
public void setPrimaryDescriptionDAO(PrimaryDescriptionDAOImpl dao){this.dao = dao;}
public void doSomething(){
dao.removeAll();
}
}
There is nothing magical about it.