title: Spring application in WebSphere. Setup of JMS message listener invoker failed
body: <p>I have a spring application deplyoed in WebSphere container and I need to configure JMS but I have a problem. Sending messages works fine but MessageListener doesn't consumes messages.</p>
  
  <p>This is my jms config:</p>
  
  <pre><code>@Bean
  public PlatformTransactionManager transactionManager() {
      return new WebSphereUowTransactionManager();
  }
  
  @Bean
  public ConnectionFactory jmsConnectionFactory() throws NamingException {
      return jndi().lookup(CONNECTION_FACTORY_ADDRESS, ConnectionFactory.class);
  }
  
  @Bean(name = "queue")
  public Queue jmsQueue() throws NamingException {
      return jndi().lookup(QUEUE_ADDRESS, Queue.class);
  }
  
  @Bean(name = "replyQueue")
  public Queue jmsReplyQueue() throws NamingException {
      return jndi().lookup(REPLY_QUEUE_ADDRESS, Queue.class);
  }
  
  @Bean
  public DestinationResolver jmsDestinationResolver() {
      return new JndiDestinationResolver();
  }
  
  @Bean
  public DefaultJmsListenerContainerFactory jmsListenerContainerFactory() throws NamingException {
      final DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
      factory.setConnectionFactory(jmsConnectionFactory());
      factory.setDestinationResolver(jmsDestinationResolver());
      factory.setTransactionManager(transactionManager());
      factory.setSessionTransacted(true);
      factory.setConcurrency("3-10");
      factory.setTaskExecutor(threadPoolTaskExecutor());
      return factory;
  }
  
  @Bean
  public TaskExecutor threadPoolTaskExecutor() {
      ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
      executor.setCorePoolSize(5);
      executor.setMaxPoolSize(10);
      executor.setQueueCapacity(50);
      executor.setKeepAliveSeconds(20);
  
      return executor;
  }
  </code></pre>
  
  <p>I get this exception on startup:</p>
  
  <pre><code>[08.06.17 18:23:38:765 MSK] 00000409 DefaultMessag W org.springframework.jms.listener.DefaultMessageListenerContainer handleListenerSetupFailure Setup of JMS message listener invoker failed for destination 'jms/test_queue' - trying to recover. Cause: No JTA UserTransaction available - programmatic PlatformTransactionManager.getTransaction usage not supported
  </code></pre>
  
  <p>I read that It can be cause of the conflict with hibernate transitive dependency. I've tried to exclude <code>jboss-transaction-api_1.1_spec</code> dependency from hibernate-core but it didn't help.</p>
  
  <p>I've also tried to use WorkManagerTaskExecutor:</p>
  
  <pre><code>@Bean
  public TaskExecutor taskExecutor() {
      WorkManagerTaskExecutor executor = new WorkManagerTaskExecutor();
      executor.setWorkManagerName("wm/default");
      return executor;
  }
  </code></pre>
  
  <p>But exception is still throws.</p>
  
  <p>What could be the problem?</p>