Package javax.ejb

Examples of javax.ejb.NoSuchObjectLocalException


            return null;
        }

        final TimerEntity timerEntity = timerPersistence.getValue().loadTimer(id, timedObjectId);
        if (timerEntity == null) {
            throw new NoSuchObjectLocalException("Could not load timer with id " + id);
        }
        if (timerEntity.isCalendarTimer()) {
            return new CalendarTimer((CalendarTimerEntity) timerEntity, this);
        }
        return new TimerImpl(timerEntity, this);
View Full Code Here


         {
            destroySession(id);
         }
         catch (NoSuchEJBException e)
         {
            throw new NoSuchObjectLocalException(e.getMessage(), e);
         }

         return null;
      }
      else if (unadvisedMethod.getName().equals("getEJBLocalHome"))
View Full Code Here

    }

    private void isValidReference(Method method) throws NoSuchObjectException {
        if (isInvalidReference) {
            if (interfaceType.isComponent() && interfaceType.isLocal()){
                throw new NoSuchObjectLocalException("reference is invalid");
            } else if (interfaceType.isComponent() || java.rmi.Remote.class.isAssignableFrom(method.getDeclaringClass())) {
                throw new NoSuchObjectException("reference is invalid");
            } else {
                throw new NoSuchEJBException("reference is invalid");
            }
View Full Code Here

        }
        if (e instanceof NoSuchObjectException) {
            if (!rmiRemote && interfaceType.isBusiness()) {
                return new NoSuchEJBException(e.getMessage()).initCause(getCause(e));
            } else if (interfaceType.isLocal()) {
                return new NoSuchObjectLocalException(e.getMessage()).initCause(getCause(e));
            } else {
                return e;
            }
        }
        if (e instanceof RemoteException) {
View Full Code Here

    }

    public Timer getTimer() {
        ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
        if (containerSystem == null) {
            throw new NoSuchObjectLocalException("OpenEJb container system is not running");
        }
        DeploymentInfo deploymentInfo = containerSystem.getDeploymentInfo(deploymentId);
        if (deploymentInfo == null) {
            throw new NoSuchObjectLocalException("Deployment info not found " + deploymentId);
        }
        EjbTimerService timerService = deploymentInfo.getEjbTimerService();
        if (timerService == null) {
            throw new NoSuchObjectLocalException("Deployment no longer supports ejbTimout " + deploymentId + ". Has this ejb been redeployed?");
        }
        Timer timer = timerService.getTimer(id);
        if (timer == null) {
            throw new NoSuchObjectLocalException("Timer not found for ejb " + deploymentId);
        }
        return timer;
    }
View Full Code Here

    private void checkState() throws IllegalStateException, NoSuchObjectLocalException {
        if (!BaseContext.isTimerMethodAllowed()) {
            throw new IllegalStateException("Timer method not permitted for current operation " + ThreadContext.getThreadContext().getCurrentOperation().name());
        }
        if (timerData.isCancelled()) {
            throw new NoSuchObjectLocalException("Timer has been cancelled");
        }
    }
View Full Code Here

    }

    private void isValidReference(final Method method) throws NoSuchObjectException {
        if (isInvalidReference) {
            if (interfaceType.isComponent() && interfaceType.isLocal()) {
                throw new NoSuchObjectLocalException("reference is invalid");
            } else if (interfaceType.isComponent() || Remote.class.isAssignableFrom(method.getDeclaringClass())) {
                throw new NoSuchObjectException("reference is invalid");
            } else {
                throw new NoSuchEJBException("reference is invalid for " + deploymentID);
            }
View Full Code Here

        }
        if (e instanceof NoSuchObjectException) {
            if (!rmiRemote && interfaceType.isBusiness()) {
                return new NoSuchEJBException(e.getMessage()).initCause(getCause(e));
            } else if (interfaceType.isLocal()) {
                return new NoSuchObjectLocalException(e.getMessage()).initCause(getCause(e));
            } else {
                return e;
            }
        }
        if (e instanceof AccessException) {
View Full Code Here

                    }          
                }
            });
            if (timer==null)
            {
               throw new NoSuchObjectLocalException();
            }
            else
            {
               return new TimerProxy(timer);
            }
View Full Code Here

      // If local EJB2.x Client
      if (EJBLocalObject.class.isAssignableFrom(actualInvokingClass)
            || EJBLocalHome.class.isAssignableFrom(actualInvokingClass))
      {
         t = new NoSuchObjectLocalException(original.getMessage());
      }
      // If remote EJB2.x Client
      else if (Remote.class.isAssignableFrom(actualInvokingClass)
            || EJBObject.class.isAssignableFrom(actualInvokingClass)
            || EJBHome.class.isAssignableFrom(actualInvokingClass))
View Full Code Here

TOP

Related Classes of javax.ejb.NoSuchObjectLocalException

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.