congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DbJtxTransactionManager.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
jodd.db.jtx.DbJtxTransactionManager
constructor

Best Java code snippets using jodd.db.jtx.DbJtxTransactionManager.<init> (Showing top 5 results out of 315)

origin: oblac/jodd

/**
 * Creates JTX transaction manager.
 */
protected JtxTransactionManager createJtxTransactionManager(final ConnectionProvider connectionProvider) {
  return new DbJtxTransactionManager(connectionProvider);
}
origin: oblac/jodd

@BeforeEach
protected void setUp() throws Exception {
  final DbPropsQueryMap queryMap = new DbPropsQueryMap();
  if (SystemUtil.info().isJavaVersion(9)) {
    queryMap.props().load(this.getClass().getClassLoader().getResourceAsStream("queries.sql.props"));
  }
  LoggerFactory.setLoggerProvider(new TestLoggerProvider());
  if (dbtxm != null) {
    return;
  }
  // create connection pool if not created
  if (cp == null) {
    cp = new CoreConnectionPool();
    setupPool(cp);
    cp.init();
  }
  dbtxm = new DbJtxTransactionManager(cp);
  dbOom = DbOom
    .create()
    .withConnectionProvider(cp)
    .withQueryMap(queryMap)
    .get()
    .connect();
  // initial data
  final DbSession session = new DbSession(cp);
  initDb(session);
  session.closeSession();
}
origin: oblac/jodd

@BeforeEach
void setUp() {
  cp = new CoreConnectionPool();
  cp.setDriver("org.hsqldb.jdbcDriver");
  cp.setUrl("jdbc:hsqldb:mem:test");
  cp.setUser("sa");
  cp.setPassword("");
  cp.init();
  dbtxm = new DbJtxTransactionManager(cp);
  // initial data
  DbSession session = new DbSession(cp);
  executeUpdate(session, "drop table BOY if exists");
  executeUpdate(session, "drop table GIRL if exists");
  String sql = "create table GIRL (" +
      "ID			integer		not null," +
      "NAME		varchar(20)	not null," +
      "SPECIALITY	varchar(20)	null," +
      "primary key (ID)" +
      ')';
  executeUpdate(session, sql);
  sql = "create table BOY (" +
      "ID			integer	not null," +
      "GIRL_ID	integer	null," +
      "NAME	varchar(20)	null," +
      "primary key (ID)," +
      "FOREIGN KEY (GIRL_ID) REFERENCES GIRL (ID)" +
      ')';
  executeUpdate(session, sql);
  session.closeSession();
}
origin: org.jodd/jodd-joy

/**
 * Creates JTX transaction manager.
 */
protected JtxTransactionManager createJtxTransactionManager(final ConnectionProvider connectionProvider) {
  return new DbJtxTransactionManager(connectionProvider);
}
origin: oblac/jodd

super.setupPool(cp);
JtxTransactionManager jtxManager = new DbJtxTransactionManager(cp);
DbJtxSessionProvider sessionProvider = new DbJtxSessionProvider(jtxManager);
jodd.db.jtxDbJtxTransactionManager<init>

Javadoc

Creates db jtx manager and registers new DbJtxResourceManager.

Popular methods of DbJtxTransactionManager

  • close
  • setMaxResourcesPerTransaction
  • setSingleResourceManager
  • requestTransaction
  • totalActiveThreadTransactions
  • totalThreadTransactions

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • Menu (java.awt)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now