throw new DeploymentException("transacted must be none, jms or xa");
}
}
protected AbstractMessageListenerContainer createListenerContainer() {
final AbstractMessageListenerContainer container;
if (LISTENER_TYPE_DEFAULT.equals(listenerType)) {
container = createDefaultMessageListenerContainer();
} else if (LISTENER_TYPE_SIMPLE.equals(listenerType)) {
container = createSimpleMessageListenerContainer();
} else if (LISTENER_TYPE_SERVER.equals(listenerType)) {
container = createServerSessionMessageListenerContainer();
} else {
throw new IllegalStateException();
}
container.setAutoStartup(false);
container.setClientId(clientId);
container.setConnectionFactory(getConnectionFactory());
if (destination != null) {
container.setDestination(destination);
} else if (destinationName != null) {
container.setDestinationName(destinationName);
}
if (getDestinationResolver() != null) {
container.setDestinationResolver(getDestinationResolver());
}
if (subscriptionDurable) {
if (durableSubscriptionName == null) {
// Use unique name generated from this endpoint
durableSubscriptionName = getService() + "#" + getEndpoint();
}
container.setDurableSubscriptionName(durableSubscriptionName);
}
container.setExceptionListener(exceptionListener);
container.setMessageSelector(messageSelector);
container.setPubSubDomain(isPubSubDomain());
container.setSessionAcknowledgeMode(sessionAcknowledgeMode);
container.setSubscriptionDurable(subscriptionDurable);
return container;
}