Examples of HibernateSessionDescriptor


Examples of org.jbpm.pvm.internal.wire.descriptor.HibernateSessionDescriptor

  public HibernateSessionBinding() {
    super("hibernate-session");
  }

  public Object parse(Element element, Parse parse, Parser parser) {
    HibernateSessionDescriptor descriptor = new HibernateSessionDescriptor();

    if (element.hasAttribute("factory")) {
      descriptor.setFactoryName(element.getAttribute("factory"));
    }
   
    Boolean tx = XmlUtil.attributeBoolean(element, "tx", false, parse);
    if (tx!=null) {
      descriptor.setTx(tx);
    }

    Boolean useCurrent = XmlUtil.attributeBoolean(element, "current", false, parse);
    // if usage of current session is specified
    if (useCurrent!=null) {
      // set it accordingly
      descriptor.setUseCurrent(useCurrent);
      // and set the default of close appropriately
      descriptor.setClose( !useCurrent );
    }
   
    Boolean close = XmlUtil.attributeBoolean(element, "close", false, parse);
    if (close!=null) {
      descriptor.setClose(close);
    }

    if (element.hasAttribute("standard-transaction")) {
      descriptor.setStandardTransactionName(element.getAttribute("standard-transaction"));
    }
   
    if (element.hasAttribute("connection")) {
      descriptor.setConnectionName(element.getAttribute("connection"));
    }

    return descriptor;
  }
View Full Code Here

Examples of org.jbpm.wire.descriptor.HibernateSessionDescriptor

* @author Tom Baeyens
*/
public class HibernateSessionBinding implements Binding {

  public Object parse(Element element, Parse parse, Parser parser) {
    HibernateSessionDescriptor descriptor = new HibernateSessionDescriptor();

    if (element.hasAttribute("factory")) {
      descriptor.setFactoryName(element.getAttribute("factory"));
    }
   
    String txText = XmlUtil.attribute(element, "tx");
    Boolean tx = XmlUtil.booleanEquals(txText, null);
    if (tx!=null) {
      descriptor.setTx(tx);
    }
   
    if (element.hasAttribute("standard-transaction")) {
      descriptor.setStandardTransactionName(element.getAttribute("standard-transaction"));
    }
   
    if (element.hasAttribute("connection")) {
      descriptor.setConnectionName(element.getAttribute("connection"));
    }

    return descriptor;
  }
View Full Code Here
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.