Examples of beginTransaction()


Examples of cirrus.hibernate.Session.beginTransaction()

        Session     s = getHibernateSession(  );
        Transaction tx = null;

        try
        {
            tx = s.beginTransaction(  );

            /* Customer */
            Customer cst = ( Customer ) s.load( Customer.class, getUserId(  ) );

            /* Order + Items*/
 
View Full Code Here

Examples of cirrus.hibernate.Session.beginTransaction()

        {
            session = _sessionFactory.openSession(  );

            BookmarkImpl bk = new BookmarkImpl( null, title, url.toString(), description, user );

            tx = session.beginTransaction(  );
            session.save( bk );
            tx.commit(  );

            return bk.getId(  );
        }
View Full Code Here

Examples of cirrus.hibernate.Session.beginTransaction()

            BookmarkImpl bk = ( BookmarkImpl ) session.load( BookmarkImpl.class, id );
            bk.setTitle( title );
            bk.setUrl( url.toString() );
            bk.setDescription( description );

            tx = session.beginTransaction(  );
            session.update( bk );
            tx.commit(  );
        }
        catch( cirrus.hibernate.ObjectNotFoundException o )
        {
View Full Code Here

Examples of cirrus.hibernate.Session.beginTransaction()

        try
        {
            session = _sessionFactory.openSession(  );

            tx = session.beginTransaction(  );
            for ( int i = 0; i < ids.length; i++ )
            {
                BookmarkImpl bk = ( BookmarkImpl ) session.load( BookmarkImpl.class, ids[ i ] );
                try
                {
View Full Code Here

Examples of co.paralleluniverse.galaxy.Store.beginTransaction()

    public void run() throws ExecutionException, InterruptedException {
        switch (SCENARIO.testGenEvent) {
            case test:
                final Store store = Grid.getInstance().store();
                if (i == 1) {
                    StoreTransaction tx = store.beginTransaction();
                    try {
                        long root = store.getRoot("root", tx);
                        byte buf[] = null;//"hello".getBytes();
                        store.set(root, buf, tx);
                        store.commit(tx);
View Full Code Here

Examples of co.paralleluniverse.galaxy.quasar.Store.beginTransaction()

        final String rootName = actor.getName();

        LOG.info("Registering actor {} at root {}", actor, rootName);

        final Store store = grid.store();
        StoreTransaction txn = store.beginTransaction();
        serlock.lock();
        try {
            try {
                final long root = store.getRoot(rootName, txn);
                store.getx(root, txn);
View Full Code Here

Examples of com.avaje.ebean.EbeanServer.beginTransaction()

    Product prod1 = createProduct(100,"apples");
    server.insert(prod1);
    Product prod2 = createProduct(101, "bananas");
    server.insert(prod2);
   
    server.beginTransaction();
    // effectively load these into the persistence context
    server.find(Product.class, prod1.getId());
    server.find(Product.class, prod2.getId());
   
    server.delete(Product.class, Arrays.asList(prod1.getId(), prod2.getId()));
View Full Code Here

Examples of com.buschmais.jqassistant.core.store.api.Store.beginTransaction()

    }

    @Override
    public Iterable<FileDescriptor> scan(MavenProject project, String path, Scope scope, Scanner scanner) throws IOException {
        Store store = getStore();
        store.beginTransaction();
        MavenProjectDirectoryDescriptor projectDescriptor;
        try {
            projectDescriptor = resolveProject(project, MavenProjectDirectoryDescriptor.class);
            projectDescriptor.setFileName(project.getBasedir().getAbsolutePath());
            projectDescriptor.setPackaging(project.getPackaging());
View Full Code Here

Examples of com.google.api.services.datastore.client.Datastore.beginTransaction()

    try {
      // Create an RPC request to begin a new transaction.
      BeginTransactionRequest.Builder treq = BeginTransactionRequest.newBuilder();
      // Execute the RPC synchronously.
      BeginTransactionResponse tres = datastore.beginTransaction(treq.build());
      // Get the transaction handle from the response.
      ByteString tx = tres.getTransaction();

      // Create an RPC request to get entities by key.
      LookupRequest.Builder lreq = LookupRequest.newBuilder();
View Full Code Here

Examples of com.google.appengine.api.datastore.AsyncDatastoreService.beginTransaction()

        Assert.assertNotNull(attributes.getDatastoreType());

        Map<Index, Index.IndexState> indexes = waitOnFuture(service.getIndexes());
        Assert.assertNotNull(indexes);

        Transaction tx = waitOnFuture(service.beginTransaction());
        try {
            String txId = tx.getId();
            Assert.assertNotNull(txId);
            Assert.assertEquals(txId, tx.getId());
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.