Package javax.ejb

Examples of javax.ejb.NoSuchEJBException


   {
      synchronized (cache)
      {
         Entry entry = cache.get(key);
         if(entry == null)
            throw new NoSuchEJBException(String.valueOf(key));
         if(entry.state != State.READY)
            throw new IllegalStateException("entry " + entry + " is not ready");
         entry.state = State.IN_USE;
         entry.lastUsed = System.currentTimeMillis();
         return entry.obj;
View Full Code Here


   {
      synchronized (cache)
      {
         Entry entry = cache.get(key);
         if(entry == null)
            throw new NoSuchEJBException(String.valueOf(key));
         return entry.obj;
      }
   }
View Full Code Here

         entry = cache.remove(key);
         if(entry.state != State.READY)
            throw new IllegalStateException("entry " + entry + " is not ready");
      }
      if(entry == null)
         throw new NoSuchEJBException(String.valueOf(key));
      factory.destroy(entry.obj);
   }
View Full Code Here

        try {
            localObjectImpl.remove();
        } catch(EJBException e) {
            LogFacade.getLogger().log(Level.FINE, "EJBException during remove. ", e);   
        } catch(javax.ejb.RemoveException re) {
            throw new NoSuchEJBException(re.getMessage(), re);
        }

    }
View Full Code Here

        this.lcm = lcm;
    }

    protected void checkInit() {
        if( singletonInitializationFailed ) {
            throw new NoSuchEJBException("Singleton " + ejbDescriptor.getName() + " is unavailable " +
                                   "because its original initialization failed.");
        }

        if (! singletonInitialized.get()) {
            //Note: NEVER call instantiateSingletonInstance() directly from here
View Full Code Here

         localActivity.set(active);
      }

      if (entry == null)
      {
         throw new NoSuchEJBException("Could not find stateful bean: " + key);
      }
      else if (markInUse && entry.isRemoved())
      {
         throw new NoSuchEJBException("Could not find stateful bean: " + key +
                                      " (bean was marked as removed)");
      }

      entry.postReplicate();
View Full Code Here

         }
         cache.getInvocationContext().getOptionOverrides().setForceDataGravitation(true);
         StatefulBeanContext ctx = (StatefulBeanContext) cache.get(id, "bean");
        
         if(ctx == null)
            throw new NoSuchEJBException("Could not find Stateful bean: " + key);
        
         if (!ctx.isRemoved())
         {
            ejbContainer.destroy(ctx);
         }
View Full Code Here

    @Override
    @SuppressWarnings({"unchecked"})
    public synchronized <S> S getBusinessObject(Class<S> businessInterfaceType) {
        if (isRemoved()) {
            throw new NoSuchEJBException("Bean has been removed");
        }
        if (viewServices.containsKey(businessInterfaceType.getName())) {
            final ServiceController<?> serviceController = CurrentServiceContainer.getServiceContainer().getRequiredService(viewServices.get(businessInterfaceType.getName()));
            final ComponentView view = (ComponentView) serviceController.getValue();
            final ComponentViewInstance instance = view.createInstance(Collections.<Object, Object>singletonMap(StatefulSessionComponent.SESSION_ATTACH_KEY, id));
View Full Code Here

        this.cancelExpirationPassivation(key);

        E entry = store.remove(key);

        if (entry == null)
            throw new NoSuchEJBException(String.valueOf(key));

        entry.lock();
        try {
            if (entry.isInUse()) {
                entry.setInUse(false);
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) {
            //This exception will be transformed into the correct exception type by the exception transforming interceptor
            throw new NoSuchEJBException("Could not find SFSB " + component.getComponentName() + " with " + sessionId);
        }
        try {
            context.putPrivateData(ComponentInstance.class, instance);
            return context.proceed();
        } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of javax.ejb.NoSuchEJBException

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.