public void validate() throws DeploymentException { super.validate(); if (resourceAdapter == null) { throw new DeploymentException("resourceAdapter must be set"); } if (activationSpec == null) { throw new DeploymentException("activationSpec must be set"); } }
protected void cleanUpBootstrap() throws DeploymentException { try { bootstrap.cleanUp(); } catch (JBIException e) { LOGGER.error("Could not initialize bootstrap", e); throw new DeploymentException(e); } finally { initialized = false; } }
public static DeploymentException componentFailure(String task, String component, String info) { try { Element e = createComponentFailure(task, component, info, null); return new DeploymentException(DOMUtil.asXML(e)); } catch (Exception e) { LOGGER.debug("Error creating management message", e); return new DeploymentException(info); } }
public void undeploy(ServiceUnit su) throws DeploymentException { // Force a shutdown of the SU // There is no initialized state, so after deployment, the SU // is shutdown but may need a cleanup. try { su.shutDown(); } catch (Exception e) { throw new DeploymentException("Unable to shutDown service unit", e); } }
public void validate() throws DeploymentException { super.validate(); if (targetInterface == null && targetService == null && targetUri == null) { throw new DeploymentException("targetInterface, targetService or targetUri should be specified"); } } }
protected void validate(Endpoint endpoint) throws DeploymentException { for (int i = 0; i < endpointClasses.length; i++) { if (endpointClasses[i].isInstance(endpoint)) { super.validate(endpoint); return; } } throw new DeploymentException("Endpoint is not of type: " + Arrays.asList(endpointClasses) + " but is of type: " + endpoint.getClass()); }
public static DeploymentException componentFailure(String task, String component, String info) { try { Element e = createComponentFailure(task, component, info, null); return new DeploymentException(DOMUtil.asXML(e)); } catch (Exception e) { logger.debug("Error creating management message", e); return new DeploymentException(info); } }
public synchronized void shutDown(String serviceUnitID) throws DeploymentException { __log.trace("shutDown called for " + serviceUnitID); OdeServiceUnit su = _serviceUnits.remove(serviceUnitID); if (su == null) return; try { su.shutdown(); } catch (Exception ex) { String errmsg = __msgs.msgServiceUnitShutdownFailed(serviceUnitID); __log.error(errmsg, ex); throw new DeploymentException(errmsg, ex); } }
protected void checkComponentStarted(String task) throws DeploymentException { if (!ComponentLifeCycleMBean.STARTED.equals(component.getCurrentState())) { throw new DeploymentException("Component " + component.getName() + " is not started!"); } }
/** * Provides a hook to validate the statically configured endpoint */ protected void validateEndpoint(Endpoint endpoint) throws DeploymentException { if (!isKnownEndpoint(endpoint)) { throw new DeploymentException("The endpoint: " + endpoint + " is not an instance of any of the allowable types: " + Arrays.asList(getEndpointClasses())); } }
public void validate() throws DeploymentException { super.validate(); // Check xpath expression try { xpathExpression.afterPropertiesSet(); } catch (Exception e) { throw new DeploymentException("Error validating xpath expression", e); } }
public void validate() throws DeploymentException { if (xsltSource == null && getResource() == null && getExpression() == null) { throw new DeploymentException("xsltSource, resource or expression must be specified"); } }
public void validate() throws DeploymentException { if (target == null) { throw new DeploymentException("target must be specified"); } // Create correlation property correlation = "XsltProxy.Correlation." + getService() + "." + getEndpoint(); }
protected void checkComponentStartedOrStopped(String task) throws DeploymentException { if (!ComponentLifeCycleMBean.STARTED.equals(component.getCurrentState()) && !ComponentLifeCycleMBean.STOPPED.equals(component.getCurrentState())) { throw new DeploymentException("Component " + component.getName() + " is shut down!"); } }
public void undeploy() throws Exception { try { Collection<QName> undeployed = _ode._store.undeploy(_serviceUnitRootPath); for (QName pqname : undeployed) { _ode._server.unregister(pqname); } } catch (Exception ex) { String errmsg = __msgs.msgOdeProcessUndeploymentFailed(null); __log.error(errmsg, ex); throw new DeploymentException(errmsg, ex); } }
public void validate() throws DeploymentException { if (getQuery() == null && getResource() == null && getExpression() == null) { throw new DeploymentException("query, resource or expression should be specified"); } }
public void validate() throws DeploymentException { super.validate(); if (uri == null && (getClientPool() == null || getClientPool().getHost() == null)) { throw new DeploymentException("Property uri or clientPool.host must be configured"); } if (uri != null && getClientPool() != null && getClientPool().getHost() != null) { throw new DeploymentException("Properties uri and clientPool.host can not be configured at the same time"); } }
protected DeploymentException failure(String task, String info, Exception e, List componentResults) { ManagementSupport.Message msg = new ManagementSupport.Message(); msg.setTask(task); msg.setResult("FAILED"); msg.setType("ERROR"); msg.setException(e); msg.setMessage(info); return new DeploymentException(ManagementSupport.createFrameworkMessage(msg, componentResults)); }
protected DeploymentException failure(String task, String info, Exception e) throws DeploymentException { ManagementSupport.Message msg = new ManagementSupport.Message(); msg.setComponent(component.getComponentName()); msg.setTask(task); msg.setResult("FAILED"); msg.setType("ERROR"); msg.setException(e); msg.setMessage(info); return new DeploymentException(ManagementSupport.createComponentMessage(msg)); }
protected DeploymentException failure(String task, String info, Throwable e) { ManagementSupport.Message msg = new ManagementSupport.Message(); msg.setComponent(serviceUnit.getComponent().getComponentName()); msg.setTask(task); msg.setResult("FAILED"); msg.setType("ERROR"); msg.setMessage(info); msg.setException(e); return new DeploymentException(ManagementSupport.createComponentMessage(msg)); }