Mark Struberg created DELTASPIKE-458:
----------------------------------------

             Summary: UserTransaction is not always available in JNDI
                 Key: DELTASPIKE-458
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-458
             Project: DeltaSpike
          Issue Type: Bug
          Components: JPA-Module
    Affects Versions: 0.5
            Reporter: Mark Struberg
            Assignee: Mark Struberg
             Fix For: 0.6


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 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to