Use this code sample as the basis for clean up of database bound objects for event driven APIs.
Event driven API - Clean up of database bound objects
try
{
crsCatMemPersister.remove(crs_cat_mem);
}
catch(Exception exc){}
try
{
orgCatMemPersister.remove(org_cat_mem);
}
catch(Exception exc){}
try
{
crsCatPersister.remove(crs_cat);
}
catch(Exception exc){}
try
{
orgCatPersister.remove(org_cat);
}
catch(Exception exc){}
try
{
ePersister.remove(enroll);
}
catch(Exception exc){}
try
{
orgMemPersister.remove(orgmem);
}
catch(Exception exc){}
try
{
saPersister.remove(staff);
}
catch(Exception exc){}
try
{
pPersister.remove(person_1);
}
catch(Exception exc){}
try
{
pPersister.remove(person_2);
}
catch(Exception exc){}
try
{
cPersister.remove(course);
}
catch(Exception exc)
{
}
try
{
orgPersister.remove(org);
}
catch(Exception exc)
{
}