congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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