Package org.rhq.core.domain.resource

Examples of org.rhq.core.domain.resource.Resource.addDriftDefinition()


                resource = new Resource("reskey" + System.currentTimeMillis(), "resname", resourceType);
                resource.setUuid("" + new Random().nextInt());
                resource.setAgent(agent);
                resource.setInventoryStatus(InventoryStatus.COMMITTED);
                resource.addDriftDefinition(test1Def);
                resource.addDriftDefinition(test2Def);
                em.persist(resource);

            } catch (Exception e) {
                System.out.println("CANNOT PREPARE TEST: " + e);
View Full Code Here


                resource = new Resource("reskey" + System.currentTimeMillis(), "resname", resourceType);
                resource.setUuid("" + new Random().nextInt());
                resource.setAgent(agent);
                resource.setInventoryStatus(InventoryStatus.COMMITTED);
                resource.addDriftDefinition(test1Def);
                resource.addDriftDefinition(test2Def);
                em.persist(resource);

            } catch (Exception e) {
                System.out.println("CANNOT PREPARE TEST: " + e);
                getTransactionManager().rollback();
View Full Code Here

                }
            }

            if (!isUpdated) {
                validateTemplateForNewDef(driftDef, resource);
                resource.addDriftDefinition(driftDef);
                // We call persist here because if this definition is created
                // from a pinned template, then we need to generate the initial
                // change set. And we need the definition id to pass to the
                // drift server plugin.
                entityManager.persist(driftDef);
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.