Package org.keycloak.models

Examples of org.keycloak.models.KeycloakTransaction.begin()


     */
    public static void runJobInTransaction(KeycloakSessionFactory factory, KeycloakSessionTask task) {
        KeycloakSession session = factory.create();
        KeycloakTransaction tx = session.getTransaction();
        try {
            tx.begin();
            task.run(session);

            if (tx.isActive()) {
                if (tx.getRollbackOnly()) {
                    tx.rollback();
View Full Code Here


        factory = getFactory();
        getLogger().info("Retrieved factory: " + factory);
        KeycloakSession session = factory.create();
        KeycloakTransaction transaction = session.getTransaction();
        transaction.begin();

        int workerId = counter.getAndIncrement();
        try {
            worker.setup(workerId, session);
            setupSuccess = true;
View Full Code Here

        }

        KeycloakSession session = factory.create();
        KeycloakTransaction transaction = session.getTransaction();
        try {
            transaction.begin();

            worker.run(result, session);

            result.setResponseCodeOK();
            transaction.commit();
View Full Code Here

        KeycloakSession session = sessionFactory.create();
        ResteasyProviderFactory.pushContext(KeycloakSession.class, session);

        KeycloakTransaction tx = session.getTransaction();
        ResteasyProviderFactory.pushContext(KeycloakTransaction.class, tx);
        tx.begin();

        try {
            filterChain.doFilter(servletRequest, servletResponse);
            if (tx.isActive()) {
                if (tx.getRollbackOnly()) tx.rollback();
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.