Package org.springextensions.db4o

Examples of org.springextensions.db4o.Db4oTransactionManager


  /**
   * @return The lazily instantiated db level trans manager.
   */
  private Db4oTransactionManager getTransMgr() {
    if(tm == null) {
      final Db4oTransactionManager db4oTm = new Db4oTransactionManager(oc);

      // set the transaction timeout
      final int timeout = 60 * 4; // 4 mins
      db4oTm.setDefaultTimeout(timeout);
      log.info("Set DB4O default transaction timeout to: " + timeout);

      // validate configuration
      try {
        db4oTm.afterPropertiesSet();
      }
      catch(final Exception e) {
        throw new IllegalStateException(e);
      }

View Full Code Here


        @Inject
        EmbeddedObjectContainer oc;

        @Override
        public PlatformTransactionManager get() {
          final Db4oTransactionManager db4oTm = new Db4oTransactionManager(oc);

          // set the transaction timeout
          final int timeout =
              config == null ? DEFAULT_TRANS_TIMEOUT : config.getInt(Db4oConfigKeys.DB_TRANS_TIMEOUT.getKey(),
                  DEFAULT_TRANS_TIMEOUT);
          db4oTm.setDefaultTimeout(timeout);
          log.info("Set DB4O default transaction timeout to: " + timeout);

          // validate configuration
          try {
            db4oTm.afterPropertiesSet();
          }
          catch(final Exception e) {
            throw new IllegalStateException(e);
          }
View Full Code Here

        @Inject
        ObjectContainer oc;

        @Override
        public PlatformTransactionManager get() {
          final Db4oTransactionManager db4oTm = new Db4oTransactionManager(oc);

          // set the transaction timeout
          final int timeout =
            config == null ? DEFAULT_TRANS_TIMEOUT : config.getInteger(ConfigKeys.DB_TRANS_TIMEOUT.getKey(),
                DEFAULT_TRANS_TIMEOUT);
          db4oTm.setDefaultTimeout(timeout);
          log.info("Set DB4O default transaction timeout to: " + timeout);

          // validate configuration
          try {
            db4oTm.afterPropertiesSet();
          }
          catch(final Exception e) {
            throw new IllegalStateException(e);
          }
View Full Code Here

  /**
   * @return The lazily instantiated db level trans manager.
   */
  private Db4oTransactionManager getTransMgr() {
    if(tm == null) {
      final Db4oTransactionManager db4oTm = new Db4oTransactionManager(oc);

      // set the transaction timeout
      final int timeout = 60 * 4; // 4 mins
      db4oTm.setDefaultTimeout(timeout);
      log.info("Set DB4O default transaction timeout to: " + timeout);

      // validate configuration
      try {
        db4oTm.afterPropertiesSet();
      }
      catch(final Exception e) {
        throw new IllegalStateException(e);
      }

View Full Code Here

TOP

Related Classes of org.springextensions.db4o.Db4oTransactionManager

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.