Package java.rmi

Examples of java.rmi.ServerException


    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        try {
            processRequest(request, response);
        } catch (TwitterException ex) {
            throw new ServerException("TwitterException", ex);
        } catch (Exception ex) {
          throw new ServerException("Everything else exception", ex);
    }
       
    }
View Full Code Here


        if (ex instanceof UnknownException) {
            Throwable orig = ((UnknownException)ex).originalEx;
            if (orig instanceof Error) {
                return new ServerError("Error occurred in server thread",(Error)orig);
            } else if (orig instanceof RemoteException) {
                return new ServerException("RemoteException occurred in server thread",
                    (Exception)orig);
            } else if (orig instanceof RuntimeException) {
                throw (RuntimeException) orig;
            }
        }
View Full Code Here

        }

        if (orig instanceof Error) {
            return new ServerError("Error occurred in server thread",(Error)orig);
        } else if (orig instanceof RemoteException) {
            return new ServerException("RemoteException occurred in server thread",
                                       (Exception)orig);
        } else if (orig instanceof RuntimeException) {
            throw (RuntimeException) orig;
        }
View Full Code Here

         EJBHome home = (EJBHome) ic.lookup(jndiName);
         return home;
      }
      catch (NamingException e)
      {
         throw new ServerException("Could not get EJBHome", e);
      }
   }
View Full Code Here

            if (detail instanceof String) {
                if (((String)detail).indexOf("DataEncodingUnknown") != -1) {
                    throw new MarshalException((String)detail);
                } else {
                    throw new ServerException((String)detail);
                }
            } else {
                Object[] wrapper = (Object[])detail;
                String message = (String)wrapper[0];
                QName name = (QName)wrapper[1];
View Full Code Here

          "service", HttpServletRequestAdapter.class,
          HttpServletResponseAdapter.class);
      serviceMethod.invoke(servletReference, newReq, newResp);
    } catch (Exception e) {
      e.printStackTrace();
      throw new ServerException(
          "Invoke serivce method from Delegate Servlet failed.", e);
    } finally {
      releaseDelegateReference();
      Thread.currentThread().setContextClassLoader(original);
    }
View Full Code Here

      _volumeDao.remove(volume.getId());
      txn.commit();

    } catch (UnknownHostException uhe) {
      s_logger.warn("Unable to delete volume on filer " , uhe);
      throw new ServerException("Unable to delete volume on filer", uhe);
    }catch (NaAPIFailedException naf) {
      s_logger.warn("Unable to delete volume on filer " , naf);
      if( naf.getErrno() == 13040 ){
        s_logger.info("Deleting the volume: " + volName);
        _volumeDao.remove(volume.getId());
        txn.commit();
      }
     
      throw new ServerException("Unable to delete volume on filer", naf);
    }
    catch (NaException nae) {
      txn.rollback();
      s_logger.warn("Unable to delete volume on filer " , nae);
      throw new ServerException("Unable to delete volume on filer", nae);
    } catch (IOException ioe) {
      txn.rollback();
      s_logger.warn("Unable to delete volume on filer " , ioe);
      throw new ServerException("Unable to delete volume on filer", ioe);
    }
    finally
    {
      if (pool != null) {
        _poolDao.releaseFromLockTable(pool.getId());
View Full Code Here

      if(volumeCreated) {
        try {
          deleteRogueVolume(volName, s);//deletes created volume on filer
        } catch (NaException e) {
          s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
          throw new ServerException("Unable to create volume via cloudtools."+"Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
        } catch (IOException e) {
          s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
          throw new ServerException("Unable to create volume via cloudtools."+"Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
        }
      }
      throw new ServerException("Unable to create volume", nae);
    } catch (IOException ioe) {
      s_logger.warn("Failed to create volume on the netapp filer:", ioe);
      txn.rollback();
      if(volumeCreated) {
        try {
          deleteRogueVolume(volName, s);//deletes created volume on filer
        } catch (NaException e) {
          s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
          throw new ServerException("Unable to create volume via cloudtools."+"Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
        } catch (IOException e) {
          s_logger.warn("Failed to cleanup created volume whilst rolling back on the netapp filer:", e);
          throw new ServerException("Unable to create volume via cloudtools."+"Failed to cleanup created volume on netapp filer whilst rolling back on the cloud db:", e);
        }
      }
      throw new ServerException("Unable to create volume", ioe);
    }
    finally{
      if (s != null)
        s.close();
      if (pool != null)
View Full Code Here

      StringBuilder sB = new StringBuilder();
      sB.append(weeks).append(" ").append(days).append(" ").append(hours).append("@").append(whichHours).append(" ").append(minutes).append("@").append(whichMinutes);
      return sB.toString();
    } catch (NaException nae) {
      s_logger.warn("Failed to get volume size ", nae);
      throw new ServerException("Failed to get volume size", nae);
    } catch (IOException ioe) {
      s_logger.warn("Failed to get volume size ", ioe);
      throw new ServerException("Failed to get volume size", ioe);
    }
    finally{
      if (s != null)
        s.close();
    }
View Full Code Here

      }
       
     
    } catch (NaException nae) {
      s_logger.warn("Failed to get volume size ", nae);
      throw new ServerException("Failed to get volume size", nae);
    } catch (IOException ioe) {
      s_logger.warn("Failed to get volume size ", ioe);
      throw new ServerException("Failed to get volume size", ioe);
    }
    finally{
      if (s != null)
        s.close();
    }
View Full Code Here

TOP

Related Classes of java.rmi.ServerException

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.