Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-458

UserTransaction is not always available in JNDI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5
    • 0.6
    • JPA-Module
    • None

    Description

      We came across the situation that BeanManagedUserTransactionStrategy cannot find the UserTransaction in java:comp/UserTransaction via JNDI.
      I think this happens when the container starts or for some containers if you access the UserTransaction from outside an EJB. In those cases it might simply be not well specified in the EJB spec.

      In our case injecting the UserTransaction via @Resource worked perfectly fine.

      Thus I suggest a lookup chain:

      1st try the injected UserTransaction if not null
      2nd if the injection was null, we try JNDI

      Attachments

        Issue Links

          Activity

            People

              struberg Mark Struberg
              struberg Mark Struberg
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: