public void remove(CopletInstanceData copletInstanceData)
throws ProcessingException {
if ( copletInstanceData != null ) {
// now lookup the adapter
final String adapterName = copletInstanceData.getCopletData().getCopletBaseData().getCopletAdapterName();
CopletAdapter adapter = null;
ComponentSelector adapterSelector = null;
try {
adapterSelector = (ComponentSelector) this.manager.lookup( CopletAdapter.ROLE + "Selector");
adapter = (CopletAdapter)adapterSelector.select( adapterName );
adapter.logout( copletInstanceData );
adapter.destroy( copletInstanceData );
} catch (ComponentException ce) {
throw new ProcessingException("Unable to lookup coplet adapter selector or adaptor.", ce);
} finally {
if ( adapterSelector != null) {
adapterSelector.release( adapter );