Package org.apache.ode.store

Examples of org.apache.ode.store.ProcessConfDAO


        QName foobar = new QName("foo","bar");
        ConfStoreConnection conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
            ProcessConfDAO p = du.createProcess(foobar,foobar,1);
            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());
            assertNotNull(p.getDeploymentUnit());
            assertEquals("foo1", p.getDeploymentUnit().getName());
        } finally {
            conn.commit();
            conn.close();
        }
       
        conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
            ProcessConfDAO p = du.getProcess(foobar);
            assertNotNull(p);
            assertNotNull(du.getProcesses());
           
            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());

        } finally {
            conn.commit();
            conn.close();
        }
View Full Code Here


        QName foobar = new QName("foo","bar");
        ConfStoreConnection conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
            ProcessConfDAO p = du.createProcess(foobar,foobar,1);
            p.setProperty(foobar,"baz");
        } finally {
            conn.commit();
            conn.close();
        }
       
        conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
            ProcessConfDAO p = du.getProcess(foobar);
            assertNotNull(p.getProperty(foobar));
            assertEquals("baz", p.getProperty(foobar));
            assertNotNull(p.getPropertyNames());
            assertTrue(p.getPropertyNames().contains(foobar));
        } finally {
            conn.commit();
            conn.close();
        }
       
View Full Code Here

                duDao = conn.createDeploymentUnit(duName);
                duDao.setDeploymentUnitDir(duLocation);

                for (ProcessConf pConf : processConfs) {
                    try {
                        ProcessConfDAO processConfDao = duDao.createProcess(pConf.getProcessId(),
                                pConf.getType(),
                                pConf.getVersion());
                        processConfDao.setState(pConf.getState());
                        for (Map.Entry<QName, Node> prop : pConf.getProcessProperties().entrySet()) {
                            processConfDao.setProperty(prop.getKey(),
                                    DOMUtils.domToString(prop.getValue()));
                        }
                        conn.setVersion(pConf.getVersion());
                    } catch (Throwable t) {
                        String errmsg = "Error persisting deployment record for "
View Full Code Here

                DeploymentUnitDAO duDao = conn.getDeploymentUnit(duName);
                if (duDao == null) {
                    return null;
                }

                ProcessConfDAO pConfDao = duDao.getProcess(pid);
                if (pConfDao == null) {
                    return null;
                }
                pConfDao.setProperty(propName, value);
                return null;
            }
        });

        fireEvent(new ProcessStoreEvent(ProcessStoreEvent.Type.PROPERTY_CHANGED, pid, duName));
View Full Code Here

                    String errMsg = "Deployment unit " + duName + " not found.";
                    log.error(errMsg);
                    throw new ContextException(errMsg);
                }

                ProcessConfDAO pConfDao = duDao.getProcess(pid);
                if (pConfDao == null) {
                    String errMsg = "Process " + pid + " not found in deployment unit " + duName +
                            ".";
                    log.error(errMsg);
                    throw new ContextException(errMsg);
                }

                ProcessState old = pConfDao.getState();
                pConfDao.setState(processState);
                return old;
            }
        });

        ProcessConfigurationImpl pConf = (ProcessConfigurationImpl) getProcessConfiguration(pid);
View Full Code Here

        QName foobar = new QName("foo","bar");
        cf.beginTransaction();
        ConfStoreConnection conn = cf.getConnection();
        try {
            DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
            ProcessConfDAO p = du.createProcess(foobar,foobar,1);
            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());
            assertNotNull(p.getDeploymentUnit());
            assertEquals("foo1", p.getDeploymentUnit().getName());
        } finally {
            cf.commitTransaction();
        }

        cf.beginTransaction();
        conn = cf.getConnection();
        try {
            DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
            ProcessConfDAO p = du.getProcess(foobar);
            assertNotNull(p);
            assertNotNull(du.getProcesses());

            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());
        } finally {
            cf.commitTransaction();
        }
    }
View Full Code Here

        QName foobar = new QName("foo","bar");
        cf.beginTransaction();
        ConfStoreConnection conn = cf.getConnection();
        try {
            DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
            ProcessConfDAO p = du.createProcess(foobar,foobar,1);
            p.setProperty(foobar,"baz");
        } finally {
            cf.commitTransaction();
        }

        cf.beginTransaction();
        conn = cf.getConnection();
        try {
            DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
            ProcessConfDAO p = du.getProcess(foobar);
            assertNotNull(p.getProperty(foobar));
            assertEquals("baz", p.getProperty(foobar));
            assertNotNull(p.getPropertyNames());
            assertTrue(p.getPropertyNames().contains(foobar));
        } finally {
            cf.commitTransaction();
        }
    }
View Full Code Here

        QName foobar = new QName("foo","bar");
        ConfStoreConnection conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
            ProcessConfDAO p = du.createProcess(foobar,foobar,1);
            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());
            assertNotNull(p.getDeploymentUnit());
            assertEquals("foo1", p.getDeploymentUnit().getName());
        } finally {
            conn.commit();
            conn.close();
        }
       
        conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
            ProcessConfDAO p = du.getProcess(foobar);
            assertNotNull(p);
            assertNotNull(du.getProcesses());
           
            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());

        } finally {
            conn.commit();
            conn.close();
        }
View Full Code Here

        QName foobar = new QName("foo","bar");
        ConfStoreConnection conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
            ProcessConfDAO p = du.createProcess(foobar,foobar,1);
            p.setProperty(foobar,"baz");
        } finally {
            conn.commit();
            conn.close();
        }
       
        conn = cf.getConnection();
        conn.begin();
        try {
            DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
            ProcessConfDAO p = du.getProcess(foobar);
            assertNotNull(p.getProperty(foobar));
            assertEquals("baz", p.getProperty(foobar));
            assertNotNull(p.getPropertyNames());
            assertTrue(p.getPropertyNames().contains(foobar));
        } finally {
            conn.commit();
            conn.close();
        }
       
View Full Code Here

        QName foobar = new QName("foo","bar");
        cf.beginTransaction();
        ConfStoreConnection conn = cf.getConnection();
        try {
            DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
            ProcessConfDAO p = du.createProcess(foobar,foobar,1);
            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());
            assertNotNull(p.getDeploymentUnit());
            assertEquals("foo1", p.getDeploymentUnit().getName());
        } finally {
            cf.commitTransaction();
        }

        cf.beginTransaction();
        conn = cf.getConnection();
        try {
            DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
            ProcessConfDAO p = du.getProcess(foobar);
            assertNotNull(p);
            assertNotNull(du.getProcesses());

            assertEquals(foobar,p.getPID());
            assertEquals(foobar,p.getType());
        } finally {
            cf.commitTransaction();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ode.store.ProcessConfDAO

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.