Examples of FactoryConfigurationError


Examples of de.danet.an.util.ra.FactoryConfigurationError

            logger.debug ("Logging into LDAP server, env=" + env);
        }
        try {
            ctx = new InitialLdapContext(env, null);
        } catch (NamingException e) {
            throw new FactoryConfigurationError
                ("Cannot create LDAP connection: " + e.getMessage (), e);
        }
    }

Examples of de.danet.an.workflow.api.FactoryConfigurationError

    }
      }
      recoveryProps.put ("de.danet.an.workflow.engine", homeName);
   } catch (NamingException e) {
       logger.error (e.getMessage (), e);
       throw new FactoryConfigurationError
     ("Problem accessing JNDI: " + e.getMessage());
  }

   if (logger.isDebugEnabled ()) {
       logger.debug
           ("Creating new WorkflowService for "
            + mapToString("InitialContext", env) + "/" + homeName);
   }
   try {
       // Do not use EJBUtil here because we do not want
       // de.danet.an.workflow.api to depend on other packes
       // than de.danet.an.workflow.omgcore
       Object objref = serverContext.lookup(homeName);
       WorkflowEngineHome wfeh
           = (WorkflowEngineHome)PortableRemoteObject.narrow
        (objref, WorkflowEngineHome.class);
       WorkflowEngine wfe = wfeh.create();
       WorkflowService service = new StandardWorkflowService
           (recoveryProps, serverContext, wfe);
       return service;
   } catch (NamingException e) {
       logger.error (e.getMessage (), e);
       throw new FactoryConfigurationError
           ("Problem accessing JNDI: " + e.getMessage(), e);
   } catch (CreateException e) {
       logger.error (e.getMessage (), e);
       throw new FactoryConfigurationError
           ("Cannot create WorkflowEngineEJB: " + e.getMessage(), e);
  } catch (RemoteException e) {
      logger.error (e.getMessage (), e);
      throw new FactoryConfigurationError
    ("Cannot create WorkflowEngineEJB: " + e.getMessage(), e);
  }
    }

Examples of de.danet.an.workflow.api.FactoryConfigurationError

        return home;
    }
      }
  } catch (IOException ex) {
  }
  throw new FactoryConfigurationError
      ("JNDI name of workflow engine neither set as property, "
             + "specified as JNDI environment entry nor "
       + "as entry in de.danet.an.workflow-wfs.properties; "
             + "see section \"Workflow Module\" in user manual.");
    }

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

  try {
      rmsFac.setResourceAssignmentContext (rasCtx);
      rms = rmsFac.newResourceManagementService ();
  } catch (de.danet.an.workflow.spis.rms.FactoryConfigurationError e) {
      throw (FactoryConfigurationError)
          (new FactoryConfigurationError
     ("Cannot create RMS: " + e.getMessage())).initCause(e);
  }
        this.ds = ds;
    }

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

  // obtain base resource management service factory
  try {
      rmsf = ResourceManagementServiceFactory.newInstance();
  } catch (de.danet.an.workflow.spis.rms.FactoryConfigurationError e) {
      throw (FactoryConfigurationError)
    (new FactoryConfigurationError
     ("Required ResourceManagementServiceFactory not configured "
      + "properly: " + e.getMessage())).initCause(e);
  }
    }

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

    /* Comment copied from interface. */
    public ResourceAssignmentService newResourceAssignmentService ()
  throws FactoryConfigurationError {
  if (rmsf == null) {
      throw new FactoryConfigurationError
    ("Resource management service factory not configured.");
  }
  ResourceAssignmentContext rasCtx = null;
        try {
            rasCtx = (ResourceAssignmentContext)EJBUtil.createSession
                (WorkflowEngineHome.class, ENGINE_NAME);
        } catch (ResourceNotAvailableException e) {
            throw (FactoryConfigurationError)
                (new FactoryConfigurationError
                 ("Required WorkflowEngine EJB not available: "
                  + e.getMessage())).initCause(e);
           
        }
        DataSource ds = null;
        try {
            ds = (DataSource)EJBUtil.lookupJNDIEntry(DB_NAME);
        } catch (NamingException e) {
            throw (FactoryConfigurationError)
                (new FactoryConfigurationError
                 ("Required datasource available: " + e.getMessage()))
                .initCause(e);
           
        }
  return new StandardResourceAssignmentService(rmsf, rasCtx, ds);

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);
        }
    }   

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

    /* 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;

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 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());

Examples of javax.xml.parsers.FactoryConfigurationError

      }
      try {
         SAXParserFactory spf = (SAXParserFactory) factory.getClass().getClassLoader().loadClass(factoryName).newInstance();
         return  spf;
      } catch (Exception e) {
         throw new FactoryConfigurationError(e,e.getMessage());
      } // end of try-catch
   }
TOP
Copyright © 2018 www.massapi.com. 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.