3 Replies Latest reply on Sep 29, 2015 4:24 PM by Steve Fisher

    @Resource for a UserTransaction not working

    Steve Fisher Newbie

      I have a class with:

       

      @Stateless

      @WebService(targetNamespace = "http://icatproject.org")

      @TransactionManagement(TransactionManagementType.BEAN)

      public class ICAT {

       

      ...

       

        @Resource

        private UserTransaction userTransaction;

       

      when I try to deploy it I get a message in the log:

       

      INFO [org.apache.cxf.common.injection.ResourceInjector] (MSC service thread 1-6) failed to resolve resource org.icatproject.exposed.ICAT/userTransaction

       

      As this is a bean managed transaction I clearly need access to the UserTransaction. This code works on glassfish. What have I done wrong?

       

      Steve