public String getPackage() { return _du.getName(); }
public String getPackage() { return du.getName(); }
public String getPackage() { return _du.getName(); }
/** * @return Static DU version number generated from DU name. -1 when package doesn't use versioning. */ public long getStaticVersion() { return BpelCompiler.getVersion(getName()); }
/** * @return Static DU version number generated from DU name. -1 when package doesn't use versioning. */ public long getStaticVersion() { return BpelCompiler.getVersion(getName()); }
/** * Retire all the other versions of the same DU: * first take the DU name and insert version regexp, * than try to match the this string against names of already deployed DUs. * For instance if we are deploying DU "AbsenceRequest-2/AbsenceRequest.ode" and * there's already version 2 than regexp * "AbsenceRequest([-\\.](\d)+)?/AbsenceRequest.ode" will be matched against * "AbsenceRequest-2/AbsenceRequest.ode" and setRetirePackage() will be called accordingly. */ private void retirePreviousPackageVersions(DeploymentUnitDir du) { //retire all the other versions of the same DU String[] nameParts = du.getName().split("/"); /* Replace the version number (if any) with regexp to match any version number */ nameParts[0] = nameParts[0].replaceAll("([-\\Q.\\E](\\d)+)?\\z", ""); nameParts[0] += "([-\\Q.\\E](\\d)+)?"; StringBuilder duNameRegExp = new StringBuilder(du.getName().length() * 2); for (int i = 0, n = nameParts.length; i < n; i++) { if (i > 0) duNameRegExp.append("/"); duNameRegExp.append(nameParts[i]); } Pattern duNamePattern = Pattern.compile(duNameRegExp.toString()); for (String deployedDUname : _deploymentUnits.keySet()) { Matcher matcher = duNamePattern.matcher(deployedDUname); if (matcher.matches()) { setRetiredPackage(deployedDUname, true); } } }
/** * Retire all the other versions of the same DU: * first take the DU name and insert version regexp, * than try to match the this string against names of already deployed DUs. * For instance if we are deploying DU "AbsenceRequest-2/AbsenceRequest.ode" and * there's already version 2 than regexp * "AbsenceRequest([-\\.](\d)+)?/AbsenceRequest.ode" will be matched against * "AbsenceRequest-2/AbsenceRequest.ode" and setRetirePackage() will be called accordingly. */ // https://jira.jboss.org/browse/RIFTSAW-155 // need to override this in RiftSawProcessStore because Riftsaw deployment unit naming // is different from ODE. protected void retirePreviousPackageVersions(DeploymentUnitDir du) { //retire all the other versions of the same DU List<String> deployedDUNames = getPreviousPackageVersions(du.getName()); for (String deployedDUName : deployedDUNames) { setRetiredPackage(deployedDUName, true); } }
public Object call(ConfStoreConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(dudir.getName()); if (dudao == null) return null; ProcessConfDAO proc = dudao.getProcess(pid); if (proc == null) return null; proc.setProperty(propName, value); return null; } });
public Object call(ConfStoreDAOConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(dudir.getName()); if (dudao == null) return null; ProcessConfDAO proc = dudao.getProcess(pid); if (proc == null) return null; proc.setProperty(propName, value); return null; } });
fireEvent(new ProcessStoreEvent(ProcessStoreEvent.Type.UNDEPLOYED, pn, du.getName())); __log.info(__msgs.msgProcessUndeployed(pn));
fireEvent(new ProcessStoreEvent(ProcessStoreEvent.Type.UNDEPLOYED, pn, du.getName())); __log.info(__msgs.msgProcessUndeployed(pn));
public void setProperty(final QName pid, final QName propName, final String value) { if (__log.isDebugEnabled()) __log.debug("Setting property " + propName + " on process " + pid); ProcessConfImpl pconf = _processes.get(pid); if (pconf == null) { String msg = __msgs.msgProcessNotFound(pid); __log.info(msg); throw new ContextException(msg); } final DeploymentUnitDir dudir = pconf.getDeploymentUnit(); exec(new ProcessStoreImpl.Callable<Object>() { public Object call(ConfStoreDAOConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(dudir.getName()); if (dudao == null) return null; ProcessConfDAO proc = dudao.getProcess(pid); if (proc == null) return null; proc.setProperty(propName, value); return null; } }); fireEvent(new ProcessStoreEvent(ProcessStoreEvent.Type.PROPERTY_CHANGED, pid, dudir.getName())); }
public void setProperty(final QName pid, final QName propName, final String value) { if (__log.isDebugEnabled()) __log.debug("Setting property " + propName + " on process " + pid); ProcessConfImpl pconf = _processes.get(pid); if (pconf == null) { String msg = __msgs.msgProcessNotFound(pid); __log.info(msg); throw new ContextException(msg); } final DeploymentUnitDir dudir = pconf.getDeploymentUnit(); exec(new ProcessStoreImpl.Callable<Object>() { public Object call(ConfStoreConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(dudir.getName()); if (dudao == null) return null; ProcessConfDAO proc = dudao.getProcess(pid); if (proc == null) return null; proc.setProperty(propName, value); return null; } }); fireEvent(new ProcessStoreEvent(ProcessStoreEvent.Type.PROPERTY_CHANGED, pid, dudir.getName())); }
public Collection<QName> call(ConfStoreConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(du.getName()); if (dudao != null) { String errmsg = "Database out of synch for DU " + du.getName(); __log.warn(errmsg); dudao.delete(); dudao = conn.createDeploymentUnit(du.getName()); try { dudao.setDeploymentUnitDir(deploymentUnitDirectory.getCanonicalPath()); } catch (IOException e1) { String errmsg = "Error getting canonical path for " + du.getName() + "; deployment unit will not be available after restart!"; __log.error(errmsg);
public Collection<QName> call(ConfStoreDAOConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(du.getName()); if (dudao != null) { String errmsg = "Database out of synch for DU " + du.getName(); __log.warn(errmsg); dudao.delete(); dudao = conn.createDeploymentUnit(du.getName()); try { dudao.setDeploymentUnitDir(deploymentUnitDirectory.getCanonicalPath()); } catch (IOException e1) { String errmsg = "Error getting canonical path for " + du.getName() + "; deployment unit will not be available after restart!"; __log.error(errmsg);
public ProcessState call(ConfStoreDAOConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(dudir.getName()); if (dudao == null) { String errmsg = __msgs.msgProcessNotFound(pid); __log.error(errmsg); throw new ContextException(errmsg); } ProcessConfDAO dao = dudao.getProcess(pid); if (dao == null) { String errmsg = __msgs.msgProcessNotFound(pid); __log.error(errmsg); throw new ContextException(errmsg); } ProcessState old = dao.getState(); dao.setState(state); pconf.setState(state); return old; } });
public ProcessState call(ConfStoreConnection conn) { DeploymentUnitDAO dudao = conn.getDeploymentUnit(dudir.getName()); if (dudao == null) { String errmsg = __msgs.msgProcessNotFound(pid); __log.error(errmsg); throw new ContextException(errmsg); } ProcessConfDAO dao = dudao.getProcess(pid); if (dao == null) { String errmsg = __msgs.msgProcessNotFound(pid); __log.error(errmsg); throw new ContextException(errmsg); } ProcessState old = dao.getState(); dao.setState(state); pconf.setState(state); return old; } });