modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/DefaultJMSServiceListener.java [152:175]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void lookupActivationSpec() {        
        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());
        			
        	}
        	        
        	
        }
	}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/host/AsyncResponseJMSServiceListener.java [150:171]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void lookupActivationSpec() {        
        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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



