private void handleRemoveMethod(final Object[] args) throws RemoteException, RemoveException {
// check if it is an incorrect method (primary key) ?
// args has a parameter as it uses the Home interface (so no need to
// check the length of args)
if (!(args[0] instanceof Handle)) {
throw new RemoveException("The remove method is not allowed with an object which is not an handle."
+ "Primary key is only used for entity 2.1x bean.");
}
// Ok, now the given arg is an Handle, get it.
Handle handle = (Handle) args[0];