1 17 package org.apache.servicemix.jms; 18 19 import javax.jbi.management.DeploymentException; 20 21 import org.apache.servicemix.common.BaseComponent; 22 import org.apache.servicemix.common.Endpoint; 23 import org.apache.servicemix.common.xbean.AbstractXBeanDeployer; 24 25 public class JmsXBeanDeployer extends AbstractXBeanDeployer { 26 27 public JmsXBeanDeployer(BaseComponent component) { 28 super(component); 29 } 30 31 protected boolean validate(Endpoint endpoint) throws DeploymentException { 32 if (endpoint instanceof JmsEndpoint == false) { 33 throw failure("deploy", "Endpoint should be a Jms endpoint", null); 34 } 35 JmsEndpoint ep = (JmsEndpoint) endpoint; 36 if (ep.getRole() == null) { 37 throw failure("deploy", "Endpoint must have a defined role", null); 38 } 39 return true; 40 } 41 42 43 } 44 | Popular Tags |