if ( jmsBinding.getActivationSpecName() != null ) {
String createMode = jmsBinding.getActivationSpecCreate();
if ( JMSBindingConstants.CREATE_ALWAYS.equals(createMode) ) {
ActivationSpec spec = jmsResourceFactory.lookupActivationSpec(jmsBinding.getActivationSpecName());
if ( spec != null ) {
throw new JMSBindingException("ActivationSpec specifies create mode of \"always\" but resource already exists.");
}
throw new JMSBindingException("Can not create ActivationSpec");
} else if ( JMSBindingConstants.CREATE_IF_NOT_EXIST.equals(createMode)) {
ActivationSpec spec = jmsResourceFactory.lookupActivationSpec(jmsBinding.getActivationSpecName());
if ( spec == null ) {
throw new JMSBindingException("Can not create ActivationSpec");
}
} else if ( JMSBindingConstants.CREATE_NEVER.equals(createMode)) {
ActivationSpec spec = jmsResourceFactory.lookupActivationSpec(jmsBinding.getActivationSpecName());
if ( spec == null )
throw new JMSBindingException("ActivationSpec specifies create mode of \"never\" but resource does not exist at jndiName " + jmsBinding.getActivationSpecName());
} // end if
} // end if
} // end method lookupActivationSpec