Package java.rmi

Examples of java.rmi.RemoteException


               false
            );
         }
         catch (Exception e)
         {
            throw new RemoteException("Could not get management attributes on the cluster", e);
         }
         Iterator i = lValues.iterator();
         while (i.hasNext())
         {
            Object lValue = i.next();
View Full Code Here


               false
            );
         }
         catch (Exception e)
         {
            throw new RemoteException("Could not get management attributes on the cluster", e);
         }
         Iterator i = lValues.iterator();
         while (i.hasNext())
         {
            Object lValue = i.next();
View Full Code Here

            true
         );
      }
      catch (Exception e)
      {
         throw new RemoteException("Could not get management attributes on the cluster", e);
      }
      Iterator i = lValues.iterator();
      while (i.hasNext())
      {
         Object lValue = i.next();
View Full Code Here

            true
         );
      }
      catch (Exception e)
      {
         throw new RemoteException("Could not set management attributes on the cluster", e);
      }
      Iterator i = lValues.iterator();
      while (i.hasNext())
      {
         Object lValue = i.next();
         // If one value is null (because the method does not return a value) then
         // everything is fine
         if (lValue instanceof Throwable)
         {
            log.debug("invoke a method on the cluster caused an exception: " + lValue);
            if (lValue instanceof InstanceNotFoundException)
            {
               if (lException == null)
               {
                  lException = (InstanceNotFoundException) lValue; // Remember this exception
               }
            }
            else
            {
               // Only Throwables are returned
               if (lValue instanceof AttributeNotFoundException)
               {
                  throw (AttributeNotFoundException) lValue;
               }
               if (lValue instanceof InvalidAttributeValueException)
               {
                  throw (InvalidAttributeValueException) lValue;
               }
               if (lValue instanceof MBeanException)
               {
                  throw (MBeanException) lValue;
               }
               if (lValue instanceof ReflectionException)
               {
                  throw (ReflectionException) lValue;
               }
               throw new RemoteException(lValue.toString());
            }
         }
      }
      if (lException != null)
      {
View Full Code Here

            true
         );
      }
      catch (Exception e)
      {
         throw new RemoteException("Could not set management attributes on the cluster", e);
      }
      Iterator i = lValues.iterator();
      while (i.hasNext())
      {
         Object lValue = i.next();
         // If one value is null (because the method does not return a value) then
         // everything is fine
         if (lValue instanceof Throwable)
         {
            log.debug("set Attributes on the cluster caused an exception: " + lValue);
            if (lValue instanceof InstanceNotFoundException)
            {
               if (lException == null)
               {
                  lException = (InstanceNotFoundException) lValue; // Remember this exception
               }
            }
            else
            {
               if (lValue instanceof ReflectionException)
               {
                  throw (ReflectionException) lValue;
               }
               throw new RemoteException(lValue.toString());
            }
         }
      }
      if (lException != null)
      {
View Full Code Here

         );
      }
      catch (Exception e)
      {
         //AS ToDo: must be checked later how to go ahead here
         throw new RemoteException("Could not create a MBean on the cluster", e);
      }
      Iterator i = lValues.iterator();
      ObjectInstance lInstance = null;
      Throwable lException = null;
      while (i.hasNext())
      {
         Object lValue = i.next();
         if (lValue instanceof ObjectInstance)
         {
            if (lInstance == null)
            {
               lInstance = (ObjectInstance) lValue;
            }
         }
         else if (lValue instanceof Throwable)
         {
            if (lException == null)
            {
               lException = (Throwable) lValue;
            }
         }
      }
      if (lException != null)
      {
         if (lInstance != null)
         {
            // Remove all existing MBeans
            try
            {
               unregisterMBean(lInstance.getObjectName());
            }
            catch (Exception e)
            {
               // Ignore any exception
            }
         }
         if (lException instanceof InstanceAlreadyExistsException)
         {
            throw (InstanceAlreadyExistsException) lException;
         }
         if (lException instanceof MBeanException)
         {
            throw (MBeanException) lException;
         }
         if (lException instanceof MBeanRegistrationException)
         {
            throw (MBeanRegistrationException) lException;
         }
         if (lException instanceof NotCompliantMBeanException)
         {
            throw (NotCompliantMBeanException) lException;
         }
         if (lException instanceof ReflectionException)
         {
            throw (ReflectionException) lException;
         }
         throw new RemoteException(lException.toString());
      }
      return lInstance;
   }
View Full Code Here

         );
      }
      catch (Exception e)
      {
         //AS ToDo: must be checked later how to go ahead here
         throw new RemoteException("Could not unregister a MBean on the cluster", e);
      }
      Iterator i = lValues.iterator();
      Throwable lException = null;
      while (i.hasNext())
      {
         Object lValue = i.next();
         if (lValue instanceof Throwable)
         {
            lException = (Throwable) lValue;
            break;
         }
      }
      if (lException != null)
      {
         if (lException instanceof InstanceNotFoundException)
         {
            throw (InstanceNotFoundException) lException;
         }
         if (lException instanceof MBeanRegistrationException)
         {
            throw (MBeanRegistrationException) lException;
         }
         throw new RemoteException(lException.toString());
      }
   }
View Full Code Here

         // Handle or primary key?
         Object arg = mi.getArguments()[0];
         if (arg instanceof Handle)
         {
            if (arg == null)
               throw new RemoteException("Null handle");
            Handle handle = (Handle) arg;
            EJBObject ejbObject = handle.getEJBObject();
            mi.setId(ejbObject.getPrimaryKey());
         }
         else
View Full Code Here

               InvocationType type = mi.getType();
               boolean isLocal = (type == InvocationType.LOCAL || type == InvocationType.LOCALHOME);
               if (isLocal)
                  throw new EJBException("Unable to get an instance from the pool/cache", e);
               else
                  throw new RemoteException("Unable to get an intance from the pool/cache", e);
            }
           
            // Associate it with the method invocation
            mi.setEnterpriseContext(ctx);
            // Set the JACC EnterpriseBean PolicyContextHandler data
View Full Code Here

      BeanLock lock = getLockManager().getLock(id);
      lock.sync();
      try
      {
         if (cache.get(id) == null)
            throw new RemoteException("Session no longer exists: " + id);
      }
      finally
      {
         lock.releaseSync();
         getLockManager().removeLockRef(id);
View Full Code Here

TOP

Related Classes of java.rmi.RemoteException

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.