Package java.rmi

Examples of java.rmi.RemoteException


        StaticContext statEnv = parser.getStaticContext();
        final Sequence result;
        try {
            result = body.eval(null, new DynamicContext(statEnv));
        } catch (XQueryException e) {
            throw new RemoteException("Evaluation failed.", e);
        }
        return (T) wrapResult(result, returnType);
    }
View Full Code Here


    private static XQExpression localCompile(final XQueryParser parser) throws RemoteException {
        final XQueryModule module;
        try {
            module = parser.parse();
        } catch (XQueryException e) {
            throw new RemoteException("parse failed.", e);
        }
        StaticContext statEnv = parser.getStaticContext();
        try {
            module.staticAnalysis(statEnv);
        } catch (XQueryException e) {
            throw new RemoteException("Error caused in the static analysis phase.", e);
        }
        return module.getExpression();
    }
View Full Code Here

                result = rc.getResult();
            }
            if(result == null) {
                Throwable fault = rc.getFault();
                if(fault != null) {
                    throw new RemoteException("Request# " + request.getIdentifier() + " failed.\n"
                            + rc.printableStatus(), fault);
                }
                long timeout = request.getTimeout();
                if(timeout != Request.NO_TIMEOUT) {
                    String timeoutMsg = "Request# " + request.getIdentifier()
                            + " has been timeout since the request took over " + timeout / 1000
                            + " seconds";
                    LOG.warn(timeoutMsg);
                    throw new RemoteException(timeoutMsg);
                }
                LOG.warn("null result for Request#" + request.getIdentifier());
            }
        } else {// asynchronous response
            result = null;
View Full Code Here

        if(vars != null) {
            for(ShippedVariable var : vars) {
                try {
                    module.putVariable(var.getVarName(), var);
                } catch (XQueryException e) {
                    throw new RemoteException("failed to declare shipped variable: " + var, e);
                }
            }
        }

        final XQueryProcessor proccessor = new XQueryProcessor(module);
View Full Code Here

                oos.writeObject(result[i]);
                result[i] = null;
            }
            oos.flush();
        } catch (IOException e) {
            throw new RemoteException("failed to serialize", e);
        }
        final byte[] ary = bos.toByteArray_clear();
        try {
            oos.close();
        } catch (IOException e) {
View Full Code Here

        final ThreadedVariableCollector collector = new ThreadedVariableCollector();
        try {
            collector.visit(queryExpr, null);
        } catch (XQueryException e) {
            throw new RemoteException("failed runnning ThreadVariables", e);
        }
        final DynamicContext dynEnv = new DynamicContext(new StaticContext());
        dynEnv.setQueryExpression(queryExpr);
        collector.invokeThreadedVariables(dynEnv); // TODO REVIEWME cancelling
View Full Code Here

        while(actsize < size) {
            final Item e;
            try {
                e = _queue.take();
            } catch (InterruptedException ie) {
                throw new RemoteException(ie.getMessage(), ie);
            }
            if(e == SENTINEL) {
                break;
            }
            result[actsize++] = e;
        }
        final FastMultiByteArrayOutputStream bos = new FastMultiByteArrayOutputStream();
        final OutputStream os = compress ? new LZFOutputStream(bos) : bos;
        final ObjectOutputStream oos;
        try {
            oos = new ObjectOutputStream(os);
            oos.writeInt(actsize);
            for(int i = 0; i < actsize; i++) {
                oos.writeObject(result[i]);
                result[i] = null;
            }
            oos.flush();
        } catch (IOException e) {
            throw new RemoteException("failed to serialize", e);
        }
        final byte[] ary = bos.toByteArray_clear();
        try {
            oos.close();
        } catch (IOException e) {
View Full Code Here

               lLastMod = Long.parseLong(sLastMod);
            }
            catch (MalformedURLException badurl) {
              if (DebugFile.trace) DebugFile.writeln("MalformedURLException " + sProviderURL + "?method=get&key=" + sTokenKey);

              throw new RemoteException("MalformedURLException " + sProviderURL + "?method=get&key=" + sTokenKey);
            }
            catch (IOException badurl) {
              if (DebugFile.trace) DebugFile.writeln("IOException " + sProviderURL + "?method=get&key=" + sTokenKey);

              throw new RemoteException("IOException " + sProviderURL + "?method=get&key=" + sTokenKey);
            }
            catch (NumberFormatException nume) {
              if (DebugFile.trace) DebugFile.writeln("NumberFormatException " + sLastMod);

              throw new RemoteException("NumberFormatException " + sLastMod);
            }
          }
        }
        else {
          if (DebugFile.trace) DebugFile.writeln("DistributedCacheCoordinator.lastModified(" + sTokenKey + ")");
View Full Code Here

          lDtServerModified = Long.parseLong(sServerMod);
        }
        catch (MalformedURLException badurl) {
          if (DebugFile.trace) DebugFile.writeln("MalformedURLException " + sProviderURL + "?method=get&put=" + sTokenKey);

          throw new RemoteException("MalformedURLException " + sProviderURL + "?method=put&key=" + sTokenKey);
        }
        catch (IOException badurl) {
          if (DebugFile.trace) DebugFile.writeln("IOException " + sProviderURL + "?method=get&put=" + sTokenKey);

          throw new RemoteException("IOException " + sProviderURL + "?method=get&put=" + sTokenKey);
        }
        catch (NumberFormatException nume) {
          if (DebugFile.trace) DebugFile.writeln("NumberFormatException " + sServerMod);

          throw new RemoteException("NumberFormatException " + sServerMod);
        }
      }
    }
    else {
View Full Code Here

             oURLBytes.close();
             oURLBytes = null;

          }
          catch (MalformedURLException badurl) {
            throw new RemoteException("MalformedURLException " + sProviderURL + "?method=expire&key=" + sTokenKey);
          }
          catch (IOException badurl) {
            throw new RemoteException("IOException " + sProviderURL + "?method=get&key=" + sTokenKey);
          }
        } // fi (null!=sProviderURL)
      }
      else {
        if (DebugFile.trace) DebugFile.writeln("DistributedCacheCoordinator.expire(" + sTokenKey + ")");
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.