public boolean addIndividuals(ArrayList IVOs, int indId)
{
IndividualVO ivo = null;
int newId = 0;
ContactFacadeLocal indL = null;
HrFacadeLocal empL = null;
try
{
InitialContext ic = CVUtility.getInitialContext();
ContactFacadeLocalHome home = (ContactFacadeLocalHome)ic.lookup("local/ContactFacade");
indL = home.create();
indL.setDataSource(this.dataSource);
HrFacadeLocalHome emplhome = (HrFacadeLocalHome)ic.lookup("local/HrFacade");
empL = (HrFacadeLocal)emplhome.create();
empL.setDataSource(this.dataSource);
int size = IVOs.size();
for ( int i=0;i<size;i++)
{
ivo = (IndividualVO) IVOs.get(i);
newId = indL.createIndividual(ivo,indId);
empL.addEmployee(indId,newId);
logger.info("Added " + newId + " individual record");
}
}catch(Exception e)
{
logger.debug("Error in adding Individuals : "+e);