Package org.jbpm.wire

Examples of org.jbpm.wire.WireException


        }
      }
    } catch (WireException e) {
      throw e;
    } catch (Exception e) {
      throw new WireException("couldn't initialize object '"+(name!=null ? name : className)+"'", e);
    }
  }
View Full Code Here


    } else {
      configuration = wireContext.get(Configuration.class);
    }
   
    if (configuration==null) {
      throw new WireException("couldn't find configuration");
    }
   
    SessionFactory sessionFactory = configuration.buildSessionFactory();
   
    wireContext.addListener(new SessionFactoryCloser(sessionFactory));
View Full Code Here

  public Object construct(WireContext wireContext) {
    try {
      return new URL(text);
    } catch (Exception e) {
      throw new WireException("couldn't create URL for text "+text, e);
    }
  }
View Full Code Here

  public Class<?> getType(WireDefinition wireDefinition) {
    if (className!=null) {
      try {
        return ReflectUtil.loadClass(wireDefinition.getClassLoader(), className);
      } catch (JbpmReflectException e) {
        throw new WireException("couldn't create hibernate configuration '"+className+"': "+e.getMessage(), e.getCause());
      }
    }
    return Configuration.class;
  }
View Full Code Here

      return wireContext.get(contextClass);

    } else if (environmentClass!=null) {
      Environment environment = wireContext.getEnvironment();
      if (environment==null) {
        throw new WireException("no environment to search an object of type "+environmentClass.getName());
      }
      log.finest("looking up "+environmentClass.getName()+" by type in environment");
      return environment.get(environmentClass);
    }
    return null;
View Full Code Here

      } else {
        sessionFactory = wireContext.get(SessionFactory.class);
      }
    }
    if (sessionFactory==null) {
      throw new WireException("couldn't find hibernate-session-factory "+(factoryName!=null ? "'"+factoryName+"'" : "by type ")+"to open a hibernate-session");
    }

    // open the hibernate-session
    Session session = null;
    if (connectionName!=null) {
View Full Code Here

        standardTransaction = (StandardTransaction) wireContext.get(standardTransactionName);
      } else {
        standardTransaction = wireContext.get(StandardTransaction.class);
      }
      if (standardTransaction==null) {
        throw new WireException("couldn't find standard-transaction "+(standardTransactionName!=null ? "'"+standardTransactionName+"'" : "by type ")+"to enlist the hibernate transaction");
      }

      // enlist the hibernate transaction to the global transaction
      HibernateTransactionResource resource = new HibernateTransactionResource(hibernateTransaction, session);
      standardTransaction.enlistResource(resource);
View Full Code Here

  public Object construct(WireContext wireContext) {
    StandardTransaction standardTransaction = new StandardTransaction();
    Environment environment = wireContext.getEnvironment();
    if (environment==null) {
      throw new WireException("standard transaction requires environment");
    }
    standardTransaction.setEnvironment(environment);
    wireContext.addListener(standardTransaction);
    return standardTransaction;
  }
View Full Code Here

          object = Collections.synchronizedCollection((Collection) object);
        }
      }

    } catch (JbpmReflectException e) {
      throw new WireException("couldn't create '"+(name!=null ? name : className)+"': "+e.getMessage(), e.getCause());
    } catch (Exception e) {
      throw new WireException("couldn't create '"+(name!=null ? name : className)+"': "+e.getMessage(), e);
    }
    return object;
  }
View Full Code Here

        }
      }
    } catch (WireException e) {
      throw e;
    } catch (Exception e) {
      throw new WireException("couldn't initialize object '"+(name!=null ? name : className)+"'", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.jbpm.wire.WireException

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.