Examples of beginTransaction()


Examples of org.hibernate.Session.beginTransaction()

    } catch (final InterruptedException ex) {

      synchronized (getGUI().getSynchro()) {
        synchronized (getGUI().sync_tree) {
          final Session session = getGUI().getSynchro().getSessionFactory().getCurrentSession();
          session.beginTransaction();
          try {
            session.update(this); // pour le setDescription() => � enlever qd la description ne sera plus persistente

            getTarget().addEvent(new EventGenericProcess(false));
            // mettre un setstatus comme pour IPv4
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

    target_host_push.addSelectionListener(new SelectionListener() {
      public void widgetDefaultSelected(SelectionEvent e) {
        synchronized (synchro) {
          synchronized (sync_tree) {
            final Session session = synchro.getSessionFactory().getCurrentSession();
            session.beginTransaction();
            try  {
              final TargetIPv4 foo = new TargetIPv4("added by GUI",
                  GenericTools.stringToInet4Address(target_host_value.getText()), snmp_manager);
              if (addTargetAtCurrentPosition(foo) == true) foo.checkSNMPAwareness();
              target_host_value.setText("000.000.000.000");
View Full Code Here

Examples of org.hibernate.Session.beginTransaction()

            return;
          }
          synchronized (synchro) {
            synchronized (sync_tree) {
              final Session session = synchro.getSessionFactory().getCurrentSession();
              session.beginTransaction();
              try  {
                final TargetIPv6 foo = new TargetIPv6("added by GUI", address, snmp_manager);
                if (addTargetAtCurrentPosition(foo) == true) foo.checkSNMPAwareness();
                target_host6_value.setText("");
                session.getTransaction().commit();
View Full Code Here

Examples of org.hibernate.StatelessSession.beginTransaction()

    return new FunctionalTestClassTestSuite( StatelessSessionTest.class );
  }

  public void testCreateUpdateReadDelete() {
    StatelessSession ss = getSessions().openStatelessSession();
    Transaction tx = ss.beginTransaction();
    Document doc = new Document("blah blah blah", "Blahs");
    ss.insert(doc);
    assertNotNull( doc.getName() );
    Date initVersion = doc.getLastModified();
    assertNotNull( initVersion );
View Full Code Here

Examples of org.hibernate.classic.Session.beginTransaction()

    }

    Session session = sessionFactory_.openSession();
    final long startTime = System.currentTimeMillis();
    try{
      session.beginTransaction();
      Query dbQuery = session.createSQLQuery(query);
     
      dbQuery.setBoolean("resAdminAction", resourceAdminAction);
      dbQuery.setString("resId", Long.toString(resourceableId));
      if (begin != null) {
View Full Code Here

Examples of org.hibernate.impl.SessionImpl.beginTransaction()

    super.tearDown();
  }

  public void testHiLoAlgorithm() {
    SessionImpl session = (SessionImpl) sessionFactory.openSession();
    session.beginTransaction();

    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // initially sequence should be uninitialized
    assertEquals( 0L, extractSequenceValue( session ) );
View Full Code Here

Examples of org.hibernate.ogm.OgmSession.beginTransaction()

  }

  @Test
  public void testUniqueResultQuery() throws Exception {
    OgmSession session = openSession();
    Transaction transaction = session.beginTransaction();

    String nativeQuery = "MATCH ( n:" + TABLE_NAME + " { name:'Portia', author:'Oscar Wilde' } ) RETURN n";
    OscarWildePoem poem = (OscarWildePoem) session.createNativeQuery( nativeQuery )
        .addEntity( OscarWildePoem.TABLE_NAME, OscarWildePoem.class )
        .uniqueResult();
View Full Code Here

Examples of org.hibernate.search.FullTextSession.beginTransaction()

    fts.persist( insurance );
    transaction.commit();

    fts.clear();

    transaction = fts.beginTransaction();
    final QueryBuilder b = fts.getSearchFactory()
        .buildQueryBuilder()
        .forEntity( Insurance.class )
        .get();
    final Query lq = b.keyword().onField( "name" ).matching( "Macif" ).createQuery();
View Full Code Here

Examples of org.jboss.arquillian.transaction.spi.provider.TransactionProvider.beginTransaction()

                TransactionContext transactionContext = transactionContextInstance.get();
                transactionContext.activate();

                lifecycleEvent.fire(new BeforeTransactionStarted());

                transactionProvider.beginTransaction(new TransactionalTestImpl(getTransactionManager(beforeTest)));

                lifecycleEvent.fire(new AfterTransactionStarted());
            }
        }
    }
View Full Code Here

Examples of org.jboss.narayana.blacktie.jatmibroker.jab.factory.JABConnection.beginTransaction()

    String message = args[0];
    try {
      JABConnectionFactory jcf = new JABConnectionFactory(
          "JABFactoryClientTest");
      JABConnection c = jcf.getConnection("connection");
      Transaction t = c.beginTransaction(-1);
      JABBuffer b = new JABBuffer();
      b.setValue("X_OCTET", message.getBytes());
      log.info("Calling call with input: " + message);
      JABResponse call = c.call("FOOAPP", b, t, "X_OCTET", null);
      log.info("Called call with output: " + call.getValue("X_OCTET"));
View Full Code Here
TOP
Copyright © 2015 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.