Examples of RemoveException


Examples of javax.ejb.RemoveException

    public InvalidRemoveExceptionMethodInterceptor() {
    }

    @Override
    public Object processInvocation(final InterceptorContext context) throws Exception {
        throw new RemoveException("Illegal call to EJBHome.remove(Object) on a session bean");
    }
View Full Code Here

Examples of javax.ejb.RemoveException

                 * home or component interface.   The test to see if the bean instance implements
                 * javax.ejb.SessionBean is a workaround for passing the TCK while the tests in
                 * question can be challenged or the spec can be changed/updated.
                 */
                if (instance != null && instance.bean instanceof javax.ejb.SessionBean) {
                    throw new ApplicationException(new RemoveException("A stateful EJB enrolled in a transaction can not be removed"));
                }
            }

            // Start transaction
            TransactionPolicy txPolicy = createTransactionPolicy(callContext.getBeanContext().getTransactionType(callMethod, interfaceType), callContext);
View Full Code Here

Examples of javax.ejb.RemoveException

                    ejbObjectName = clazz.getSimpleName();
                    break;
                }
            }

            throw new RemoveException("Invalid argument '" + ejbObjectName + "', expected primary key.  Update to ejbLocalHome.remove(" + lcfirst(ejbObjectName) + ".getPrimaryKey())");

        } else if (primKey instanceof EJBObject) {
            Class ejbObjectProxyClass = primKey.getClass();

            String ejbObjectName = null;
            for (Class clazz : ejbObjectProxyClass.getInterfaces()) {
                if (EJBObject.class.isAssignableFrom(clazz)) {
                    ejbObjectName = clazz.getSimpleName();
                    break;
                }
            }

            throw new RemoveException("Invalid argument '" + ejbObjectName + "', expected primary key.  Update to ejbHome.remove(" + lcfirst(ejbObjectName) + ".getPrimaryKey())");
        }

        container.invoke(deploymentID, interfaceType, interfce, method, args, primKey);

        /*
 
View Full Code Here

Examples of javax.ejb.RemoveException

                 * home or component interface.   The test to see if the bean instance implements
                 * javax.ejb.SessionBean is a workaround for passing the TCK while the tests in
                 * question can be challenged or the spec can be changed/updated.
                 */
                if (instance != null && instance.bean instanceof javax.ejb.SessionBean) {
                    throw new ApplicationException(new RemoveException("A stateful EJB enrolled in a transaction can not be removed"));
                }
            }

            // Start transaction
            TransactionPolicy txPolicy = createTransactionPolicy(callContext.getBeanContext().getTransactionType(callMethod, interfaceType), callContext);
View Full Code Here

Examples of javax.ejb.RemoveException

    protected Object findX(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new UnsupportedOperationException("Stateful beans may not have find methods");
    }

    protected Object removeByPrimaryKey(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new RemoveException("Session objects are private resources and do not have primary keys");
    }
View Full Code Here

Examples of javax.ejb.RemoveException

    protected Object findX(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new UnsupportedOperationException("Stateful beans may not have find methods");
    }

    protected Object removeByPrimaryKey(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new RemoveException("Session objects are private resources and do not have primary keys");
    }
View Full Code Here

Examples of javax.ejb.RemoveException

    protected Object findX(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new UnsupportedOperationException("Stateful beans may not have find methods");
    }

    protected Object removeByPrimaryKey(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new RemoveException("Session objects are private resources and do not have primary keys");
    }
View Full Code Here

Examples of javax.ejb.RemoveException

    protected Object findX(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new UnsupportedOperationException("Stateful beans may not have find methods");
    }

    protected Object removeByPrimaryKey(Class interfce, Method method, Object[] args, Object proxy) throws Throwable {
        throw new RemoveException("Session objects are private resources and do not have primary keys");
    }
View Full Code Here

Examples of javax.ejb.RemoveException

            String msg = intres.getLocalizedMessage("ra.removedentity", username);
            logSession.log(admin, caid, LogConstants.MODULE_RA, new Date(), username, null, LogConstants.EVENT_INFO_DELETEDENDENTITY, msg);
        } catch (Exception e) {
            String msg = intres.getLocalizedMessage("ra.errorremoveentity", username);
            logSession.log(admin, caid, LogConstants.MODULE_RA, new Date(), username, null, LogConstants.EVENT_ERROR_DELETEENDENTITY, msg);
            throw new RemoveException(msg);
        }
        if (log.isTraceEnabled()) {
            log.trace("<deleteUser(" + username + ")");
        }
    }
View Full Code Here

Examples of javax.ejb.RemoveException

  // adapted if there are any more preconditions to meet.
  try {
      if (getPaTypedState().workflowState() != State.CLOSED
    && (!getPaTypedState().isSameOrSubState
        (NotRunningState.NOT_STARTED))) {
    throw new RemoveException
        ("Cannot remove " + toString() + ": still running.");
            }
            removeProcess();
      dispose();
      paProcessDef = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.