try {
InitialContext ic = new InitialContext();
CvFileLocalHome home = (CvFileLocalHome)ic.lookup("local/CvFile");
CvFileLocal remote = home.create();
remote.setDataSource(this.dataSource);
CvFolderVO homeFolderVO = remote.getHomeFolder(individualID);
try {
attachmentFolderVO = remote.getFolderByName(individualID, homeFolderVO.getFolderId(), CvFolderVO.EMAIL_ATTACHMENT_FOLDER);
}catch(CvFileException cfe){
//If the Attachment folder is not created, create it.
int newFolderID = this.createAttachmentFolder(individualID);
attachmentFolderVO = remote.getFolder(individualID, newFolderID);
}
}catch(Exception e){
System.out.println("[Exception][MailEJB] getAttachmentFolder(int): " + e);
//e.printStackTrace();
}