Examples of TransactionCallback


Examples of org.rhq.enterprise.server.test.TransactionCallback

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

        final int serverCount = 208;
        executeInTransaction(new TransactionCallback() {

            public void execute() throws Exception {
                // verify that all server objects are actually parsed.
                final Set<String> serverNames = new HashSet<String>(serverCount);
                serverNames.add(TestConstants.RHQ_TEST_SERVER_NAME);
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

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

        final int serverCount = 307;
        executeInTransaction(new TransactionCallback() {

            public void execute() throws Exception {
                // verify that all server objects are actually parsed.
                final Set<String> serverNames = new HashSet<String>(serverCount);
                serverNames.add(TestConstants.RHQ_TEST_SERVER_NAME);
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

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

        final int serverCount = 10;
        executeInTransaction(new TransactionCallback() {

            public void execute() throws Exception {
                // verify that all server objects are actually parsed.
                final Set<String> serverNames = new HashSet<String>(serverCount);
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

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

        final int serverCount = 5;

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

                final String namePrefix = "server";
                final String addressPrefix = "address";
               
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

    }
   
   
    private void testParsingHelperStartingPageEqualTo(final int startPage, final int pageSize, final int serverCount) throws Exception {

        executeInTransaction(new TransactionCallback() {
            public void execute() throws Exception {
                // verify that all server objects are actually parsed.
                final Set<String> serverNames = new TreeSet<String>();
                final String namePrefix = "server";
                final String addressPrefix = "address";
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

        assertEquals("Unexpected number of alerts on the resource.", 1, alerts.size());
    }

    private void createInventory() throws Exception {
        purgeDB(false);
        executeInTransaction(false, new TransactionCallback() {
            @Override
            public void execute() throws Exception {

                resourceType = new ResourceType(RESOURCE_TYPE, PLUGIN, SERVER, null);
                em.persist(resourceType);
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

        if (!r.isEmpty()) {
            Resource doomedResource = r.get(0);
            deleteAlertDefinitions(doomedResource.getAlertDefinitions());
        }

        executeInTransaction(false, new TransactionCallback() {
            @Override
            public void execute() throws Exception {

                if (!r.isEmpty()) {
                    //load the resource entity again within this transaction so that we
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

        // Then simulate a create resource request
        final String userSuppliedResourceName = prefix("User Supplied Resource Name");
        final String newResourceKey = prefix("Created Resource Key");
        final int serverResourceId = firstDiscoverySyncInfo.getTopLevelServerIds().iterator().next();

        executeInTransaction(false, new TransactionCallback() {
            @Override
            public void execute() throws Exception {
                Resource serverResource = getEntityManager().find(Resource.class, serverResourceId);
                CreateResourceHistory createResourceHistory = new CreateResourceHistory(serverResource, serviceType1,
                    subjectManager.getOverlord().getName(), new Configuration());
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

    // Test Cases  --------------------------------------------

    @Test(enabled = ENABLE_TESTS)
    public void testPackageBits() throws Throwable {

        executeInTransaction(new TransactionCallback() {

            public void execute() throws Exception {
                LoadedPackageBitsComposite composite;

                try {
View Full Code Here

Examples of org.rhq.enterprise.server.test.TransactionCallback

    }

    @Test(enabled = ENABLE_TESTS)
    public void testPackageBitsBlobStream() throws Throwable {

        executeInTransaction(new TransactionCallback() {

            public void execute() throws Exception {
                LoadedPackageBitsComposite composite;
                try {
                    Resource resource = SessionTestHelper.createNewResource(em, "testPkgBitsLargeResource");
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.