Package org.rhq.core.domain.shared

Examples of org.rhq.core.domain.shared.TransactionCallback


        queries.put(queryName, paramsMap);
    }

    public void testAsyncUninventory() throws Exception {

        executeInTransaction(new TransactionCallback() {

            public void execute() throws Exception {

                EntityManager entityManager = getEntityManager();
                Query q = entityManager.createNamedQuery(Resource.QUERY_MARK_RESOURCES_FOR_ASYNC_DELETION_QUICK);
View Full Code Here


        });
    }

    public void testLongVarChar() throws Exception {

        executeInTransaction(new TransactionCallback() {

            public void execute() throws Exception {

                EntityManager entityManager = getEntityManager();
View Full Code Here


    @Test(groups = "integration.ejb3")
    public void testPersistConfigurationUpdateHistory() throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {

                ResourceType type = new ResourceType("platform", "", ResourceCategory.PLATFORM, null);
                em.persist(type);
                Resource resource = new Resource("key", "name", type);
View Full Code Here

    }

    @Test(groups = "integration.ejb3")
    public void testPersistConfiguration() throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {

                Configuration c = new Configuration();
                PropertySimple p1 = new PropertySimple("first", "firstValue");
                p1.setErrorMessage(ThrowableUtil.getStackAsString(new Exception(
View Full Code Here

    }

    @Test(groups = "integration.ejb3")
    public void testConfigurationSerialization() throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {

                Configuration c = new Configuration();
                c.setId(1);
                c.setNotes("hi");
View Full Code Here

    }

    @Test(groups = "integration.ejb3")
    public void testStoreConfiguration() throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {

                Configuration configuration = new Configuration();
                configuration.setNotes("Testing");
                configuration.setVersion(1);
View Full Code Here

    }

    @Test(groups = "integration.ejb3")
    public void testReadConfigurations() throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {

                @SuppressWarnings("unchecked")
                List<Configuration> configurations = em.createQuery("Select c from Configuration c").setMaxResults(5)
                    .getResultList();
View Full Code Here

    }

    @Test(groups = "integration.ejb3")
    public void verifyPersistSavesRawConfiguration() throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {

                RawConfiguration rawConfig = createRawConfiguration();

                Configuration config = new Configuration();
View Full Code Here

    }

    @Test(groups = "integration.ejb3")
    public void verifyOrphanedRawConfigurationDeletedFromDatabase() throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {

                RawConfiguration rawConfiguration = createRawConfiguration();

                Configuration config = new Configuration();
View Full Code Here

    @Override
    protected void beforeMethod() {

        purgeDB();

        executeInTransaction(false, new TransactionCallback() {
            @Override
            public void execute() throws Exception {
                try {
                    createResourceType();
                    em.persist(resourceType);
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.shared.TransactionCallback

Copyright © 2018 www.massapicom. 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.