Package de.danet.an.workflow.spis.rms

Examples of de.danet.an.workflow.spis.rms.FactoryConfigurationError


    /* Comment copied from interface. */
    public ResourceManagementService newResourceManagementService ()
  throws FactoryConfigurationError {
  if (getResourceAssignmentContext() == null) {
      throw new FactoryConfigurationError
    ("Resource assignment service not configured.");
  }

        try {
            RmsConnectionFactory fac = (RmsConnectionFactory)
                EJBUtil.lookupJNDIEntry("java:comp/env/ra/RMS");
            return new EisRmsService (fac, getResourceAssignmentContext());
        } catch (NamingException e) {
            throw new FactoryConfigurationError(e);
        }
    }   
View Full Code Here


    /* Comment copied from interface. */
    public ResourceManagementService newResourceManagementService ()
  throws FactoryConfigurationError {
  if (getResourceAssignmentService() == null) {
      throw new FactoryConfigurationError
    ("Resource assignment service not configured.");
  }
  RmsService serviceImpl
    = new RmsService (getResourceAssignmentService());
  return serviceImpl;
View Full Code Here

    /* Comment copied from interface. */
    public ResourceManagementService newResourceManagementService ()
  throws FactoryConfigurationError {
  if (getResourceAssignmentContext() == null) {
      throw new FactoryConfigurationError
    ("Resource assignment context not configured.");
  }

  // make fallbacks
  Properties fallbacks = new Properties ();

  // try to get properties from file
  Properties baseProps = new Properties(fallbacks);
  try {
      InputStream is = DatabaseRmsFactory.class.getResourceAsStream
    ("/de.danet.an.workflow.rmsimpls.dbrms-factory.properties");
      if (is != null) {
    baseProps.load (is);
      }
  } catch (IOException ex) {
  }

  // Overrides from JNDI
  Properties props = new Properties (baseProps);
  String[] knownProps = {
      "dataSource",
            "allUsersQuery",
            "allRolesQuery",
            "allGroupsQuery",
            "userNameQuery",
            "roleNameQuery",
            "groupNameQuery",
            "userLookupQuery",
            "roleLookupQuery",
            "groupLookupQuery",
            "rolesQuery",
            "groupsQuery"
  };
  for (int i = 0; i < knownProps.length; i++) {
      try {
    String entry = (String)EJBUtil.lookupJNDIEntry
        ("java:comp/env/de.danet.an.workflow.rmsimpls.dbrms."
                     + knownProps[i]);
    props.setProperty (knownProps[i], entry);
      } catch (NamingException ne) {
    // Name not defined
      }
  }
        for (int i = 0; i < knownProps.length; i++) {
            if (props.getProperty(knownProps[i]) == null) {
                throw new FactoryConfigurationError
                    ("Missing property: " + knownProps[i]);
            }
        }

  return new DatabaseRmsService (props, getResourceAssignmentContext());
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.spis.rms.FactoryConfigurationError

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.