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


        ROOT_LOGGER.debug("Looking for stateful component instance with session id: " + sessionId);
        StatefulSessionComponentInstance instance = component.getCache().get(sessionId);
        if(instance == null) {
            final ComponentView view = context.getPrivateData(ComponentView.class);
            if(view.getViewClass() == component.getEjbLocalObjectType()) {
                throw new NoSuchObjectLocalException("Could not find SFSB " + component.getComponentName() + " with " + sessionId);
            } else if(view.getViewClass() == component.getEjbObjectType()) {
                throw new NoSuchObjectException("Could not find SFSB " + component.getComponentName() + " with " + sessionId);
            } else {
                throw new NoSuchEJBException("Could not find SFSB " + component.getComponentName() + " with " + sessionId);
            }
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");
        }
        BeanContext beanContext = containerSystem.getBeanContext(deploymentId);
        if (beanContext == null) {
            throw new NoSuchObjectLocalException("Deployment info not found " + deploymentId);
        }
        EjbTimerService timerService = beanContext.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 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

        final BeanContext beanContext = ThreadContext.getThreadContext().getBeanContext();
        final BaseContext context = (BaseContext) beanContext.get(EJBContext.class);
        context.check(BaseContext.Call.timerMethod);

        if (timerData.isCancelled()) {
            throw new NoSuchObjectLocalException("Timer has been cancelled");
        }
       
        if (timerData.isExpired()){
            throw new NoSuchObjectLocalException("The timer has expired");
        }
    }
View Full Code Here

    */
   public void callTimeout(Timer timer)
   {
      TimedObject timedObject = (TimedObject)objectMap.get(timedObjectId);
      if (timedObject == null)
         throw new NoSuchObjectLocalException("Cannot find TimedObject: " + timedObjectId);
      timedObject.ejbTimeout(timer);
   }
View Full Code Here

        Date nextTimeout;

        try {
            nextTimeout = timerService_.getNextTimeout(timerId_);
        } catch(FinderException fe) {
            throw new NoSuchObjectLocalException("timer no longer exists", fe);
        }

        return nextTimeout;
    }
View Full Code Here

        Serializable info;

        try {
            info = timerService_.getInfo(timerId_);
        } catch(FinderException fe) {
            throw new NoSuchObjectLocalException("timer no longer exists", fe);
        }

        return info;
    }
View Full Code Here

        throws IllegalStateException, NoSuchObjectLocalException {

        checkCallPermission();

        if( !timerService_.timerExists(timerId_) ) {
            throw new NoSuchObjectLocalException("timer no longer exists");
        }

        return new TimerHandleImpl(timerId_);
    }
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.