Package javax.ejb

Examples of javax.ejb.RemoveException


      {
         if (args[0] instanceof Handle)
            removeHandle((Handle) args[0]);
         else
         {
            throw new RemoveException(
                  "EJB 3.0 Specification Violation 3.6.2.2: Session beans do not have a primary key");
         }

         return null;
      }
View Full Code Here


                    } else if (method.equals(REMOVE_W_HAND)) {
                        CORBAHandle handle = (CORBAHandle) arguments[0];
                        try {
                            if (ejbDeployment.getComponentType() == BeanType.STATELESS) {
                                if (handle == null) {
                                    throw new RemoveException("Handle is null");
                                }
                                Class remoteInterface = ejbDeployment.getRemoteInterface();


                                try {
View Full Code Here

    */
   private void remove(Object target) throws RemoveException
   {
      // EJBTHREE-1217: EJBHome.remove(Object primaryKey) must throw RemoveException
      if(!(target instanceof Handle))
         throw new RemoveException("EJB 3 3.6.2.2: Session beans do not have a primary key");
     
      StatefulHandleRemoteImpl handle = (StatefulHandleRemoteImpl) target;

      try
      {
         handle.getEJBObject().remove();
      }
      catch(RemoteException re)
      {
         throw new RemoveException(re.getMessage());
      }
   }
View Full Code Here

      {
         if (args[0] instanceof Handle)
            removeHandle((Handle) args[0]);
         else
         {
            throw new RemoveException(
                  "EJB 3.0 Specification Violation 3.6.2.2: Session beans do not have a primary key");
         }

         return null;
      }
View Full Code Here

      {
         if (args[0] instanceof Handle)
            removeHandle((Handle) args[0]);
         else
         {
            throw new RemoveException(
                  "EJB 3.0 Specification Violation 3.6.2.2: Session beans do not have a primary key");
         }

         return null;
      }
View Full Code Here

    */
   private void remove(Object target) throws RemoveException
   {
      // EJBTHREE-1217: EJBHome.remove(Object primaryKey) must throw RemoveException
      if(!(target instanceof Handle))
         throw new RemoveException("EJB 3 3.6.2.2: Session beans do not have a primary key");
     
      StatefulHandleRemoteImpl handle = (StatefulHandleRemoteImpl) target;

      try
      {
         handle.getEJBObject().remove();
      }
      catch(RemoteException re)
      {
         throw new RemoveException(re.getMessage());
      }
   }
View Full Code Here

      {
         if (args[0] instanceof Handle)
            removeHandle((Handle) args[0]);
         else
         {
            throw new RemoveException(
                  "EJB 3.0 Specification Violation 3.6.2.2: Session beans do not have a primary key");
         }

         return null;
      }
View Full Code Here

    */
   private void remove(Object target) throws RemoveException
   {
      // EJBTHREE-1217: EJBHome.remove(Object primaryKey) must throw RemoveException
      if (!(target instanceof Handle))
         throw new RemoveException("EJB 3 3.6.2.2: Session beans do not have a primary key");

      StatefulHandleRemoteImpl handle = (StatefulHandleRemoteImpl) target;

      try
      {
         handle.getEJBObject().remove();
      }
      catch (RemoteException re)
      {
         throw new RemoveException(re.getMessage());
      }
   }
View Full Code Here

                 * 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.getDeploymentInfo().getTransactionType(callMethod), callContext);
View Full Code Here

    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

TOP

Related Classes of javax.ejb.RemoveException

Copyright © 2018 www.massapicom. 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.