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 ObjectName createExtensionMBeanName() throws Exception { return this.context.getMBeanNames().createCustomComponentMBeanName("Configuration"); }
/** * the constructor. * @param c * the component context * @param dl * the rmi delivery channel * @throws RemoteException * impossbile to realize a rmi access */ public RemoteComponentContextImpl(final ComponentContext c, final RemoteDeliveryChannel dl) throws RemoteException { super(); this.componentContext = c; this.rmiDeliveryChannel = dl; this.mBn = new org.objectweb.petals.tools.rmi.common.serializable. MBeanNames(this.componentContext.getMBeanNames().getJmxDomainName()); }
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); } }
protected ObjectName createExtensionMBeanName() throws Exception { return this.context.getContext().getMBeanNames().createCustomComponentMBeanName("bootstrap"); }
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 ObjectName createExtensionMBeanName() throws Exception { return this.context.getContext().getMBeanNames().createCustomComponentMBeanName("bootstrap"); }
@Override public void validate() throws DeploymentException { super.validate(); // check listen address not null if (this.address == null) { throw new DeploymentException("The listen address attribute has to be specified!"); } // check if address is valid try { if (GenericAddress.parse(this.address) == null) { throw new DeploymentException("The specified address " + address + " is not valid!"); } } catch (IllegalArgumentException ex) { throw new DeploymentException("The specified address " + address + " is not valid!"); } }
protected ObjectName createExtensionMBeanName() throws Exception { return this.context.getContext().getMBeanNames().createCustomComponentMBeanName("bootstrap"); }
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 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 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); } }
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 validate() throws DeploymentException { if (getQuery() == null && getResource() == null && getExpression() == null) { throw new DeploymentException("query, resource or expression should be specified"); } }
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)); }