Package org.openbp.core

Examples of org.openbp.core.OpenBPException


      }

      // First, look up the RMI registry
      Registry registry = LocateRegistry.getRegistry(connectionInfo.getRmiServerHost(), connectionInfo.getRmiServerPort());
      if (registry == null)
        throw new OpenBPException("ServerConnection.Unvavailable", "Error connecting to server " + connectionInfo.getRmiServerHost()
          + ", port " + connectionInfo.getRmiServerPort() + ".");

      // Next, get the service registry over RMI
      try
      {
        server = (RemoteConnector) registry.lookup(CoreConstants.RMI_BINDING_NAME);
      }
      catch (NotBoundException e)
      {
        LogUtil.info(getClass(), "Connect to RMI server $0, port {1} failed.", connectionInfo.getRmiServerHost(), new Integer(connectionInfo.getRmiServerPort()));

        throw new OpenBPException("ServerConnection.Unvavailable", "Error connecting to the RemoteConnector on the server", e);
      }

      LogUtil.info(getClass(), "Connected to RMI server.");
    }
    catch (RemoteException e)
View Full Code Here


    Throwable cause = e.getCause();
    if (cause != null)
    {
      t = cause;
    }
    throw new OpenBPException("ServerConnection.Invocation", "Error requesting or invoking service.", t);
  }
View Full Code Here

  public void validate()
  {
    if (rmiServerHost == null)
    {
      String message = MsgFormat.format("Missing property $0.", REGISTRY_HOST_PROP);
      throw new OpenBPException("Connection.Properties", message);
    }

    if (rmiServerPort <= 0)
    {
      String message = MsgFormat.format("Missing or invalid property $0.", REGISTRY_PORT_PROP);
      throw new OpenBPException("Connection.Properties", message);
    }
  }
View Full Code Here

    if (cacheContent == Boolean.FALSE)
    {
      if (throwError)
      {
        throw new OpenBPException("ServerConnection.Unvavailable", "Service not available, try server reconnect.");
      }
      return null;
    }

    Object service = cacheContent;

    if (service == null)
    {
      // Service not in cache
      if (remoteServiceFactory == null)
      {
        // No service registry
        if (throwError)
        {
          throw new OpenBPException("ServerConnection.Unvavailable", "Service not available, try server reconnect.");
        }
        return null;
      }

      try
      {
        // Look up the remote service
        service = remoteServiceFactory.getService(serviceCls);

        // Save to cache
        serviceCache.put(serviceCls.getName(), service);
      }
      catch (OpenBPException e)
      {
        // Save error marker to cache
        serviceCache.put(serviceCls.getName(), Boolean.FALSE);

        if (throwError)
        {
          throw new OpenBPException("ServerConnection.Unvavailable", "Error obtaining service " + serviceCls.getName() + ".", e);
        }
      }
    }

    return service;
View Full Code Here

    {
      return InetAddress.getLocalHost().getHostName();
    }
    catch (UnknownHostException e)
    {
      throw new OpenBPException("InvalidHostNameConfiguration", "Cannot determine name of local host", e);
    }
  }
View Full Code Here

      quartzInstance.scheduleJob(job, trigger);
    }
    catch (SchedulerException e)
    {
      throw new OpenBPException("scheduler.scheduleProcess", "Error scheduling process.", e);
    }
  }
View Full Code Here

        quartzInstance.scheduleJob(trigger);
      }
    }
    catch (SchedulerException e)
    {
      throw new OpenBPException("scheduler.scheduleProcess", "Error scheduling process.", e);
    }
  }
View Full Code Here

    {
      quartzInstance.deleteJob(jobName, jobGroup);
    }
    catch (SchedulerException e)
    {
      throw new OpenBPException("scheduler.deleteJob", "Error deleting process.", e);
    }
  }
View Full Code Here

    {
      return quartzInstance.getJobGroupNames();
    }
    catch (SchedulerException e)
    {
      throw new OpenBPException("scheduler.getJobGroupNames", "Error scheduling process.", e);
    }
  }
View Full Code Here

    {
      return quartzInstance.getJobNames(groupName);
    }
    catch (SchedulerException e)
    {
      throw new OpenBPException("scheduler.getJobNames", "Error scheduling process.", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.openbp.core.OpenBPException

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.