Package javax.ejb

Examples of javax.ejb.NoSuchEJBException


    }

    @Override
    public void ejbLoad() throws EJBException, RemoteException {
        if(!DataStore.DATA.containsKey(entityContext.getPrimaryKey())) {
            throw new NoSuchEJBException("no EJB with id" + entityContext.getPrimaryKey());
        }
        this.myField = DataStore.DATA.get(entityContext.getPrimaryKey());
    }
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

            if(entry == null)
            {
               entry = pm.activateSession(key);
               if (entry == null)
               {
                  throw new NoSuchEJBException("Could not find stateful bean: " + key);
               }
               --passivatedCount;
              
               // We cache the entry even if we will throw an exception below
               // as we may still need it for its children and XPC references
               if (log.isTraceEnabled())
               {
                  log.trace("Caching activated context " + entry.getId() + " of type " + entry.getClass());
               }
              
               synchronized (cacheMap)
               {
                  cacheMap.put(key, entry);
               }
            }
         }
      }
     
      // Now we know entry isn't null
      if (markInUse)
      {
         if (entry.isRemoved())
         {
            throw new NoSuchEJBException("Could not find stateful bean: " + key +
                                         " (bean was marked as removed");
         }     
     
         entry.setInUse(true);
         entry.lastUsed = System.currentTimeMillis();
View Full Code Here

      synchronized (cacheMap)
      {
         ctx = cacheMap.get(key);
      }
      if(ctx == null)
         throw new NoSuchEJBException("Could not find Stateful bean: " + key);
      if (!ctx.isRemoved())
         container.destroy(ctx);
     
      ++removeCount;
     
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

            if(entry == null)
            {
               entry = pm.activateSession(key);
               if (entry == null)
               {
                  throw new NoSuchEJBException("Could not find stateful bean: " + key);
               }
               --passivatedCount;
              
               // We cache the entry even if we will throw an exception below
               // as we may still need it for its children and XPC references
               if (log.isTraceEnabled())
               {
                  log.trace("Caching activated context " + entry.getId() + " of type " + entry.getClass());
               }
              
               synchronized (cacheMap)
               {
                  cacheMap.put(key, entry);
               }
            }
         }
      }
     
      // Now we know entry isn't null
      if (markInUse)
      {
         if (entry.isRemoved())
         {
            throw new NoSuchEJBException("Could not find stateful bean: " + key +
                                         " (bean was marked as removed");
         }     
     
         entry.setInUse(true);
         entry.lastUsed = System.currentTimeMillis();
View Full Code Here

      synchronized (cacheMap)
      {
         ctx = cacheMap.get(key);
      }
      if(ctx == null)
         throw new NoSuchEJBException("Could not find Stateful bean: " + key);
      if (!ctx.isRemoved())
         container.destroy(ctx);
     
      ++removeCount;
     
View Full Code Here

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (isInvalidReference) {
            if (remote || java.rmi.Remote.class.isAssignableFrom(method.getDeclaringClass())){
                throw new NoSuchObjectException("reference is invalid");
            } else {
                throw new NoSuchEJBException("reference is invalid");
            }
        }

        Object returnObj = null;
        returnObj = _invoke(proxy, method, args);
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.