| Author |
Injecting @Resource UserTransaction results in null
|
B Nirvan
Ranch Hand
Joined: Oct 20, 2010
Posts: 82
|
|
I am trying to use JTA transactions (without EJB) in my JPA project. I am trying to inject UserTransaction using the following code in one of my java class
but nothing gets injected and the tran variable is null. Am I missing out any configuration steps. I am using Glassfish V3.
regards,
Nirvan.
|
 |
Tim Hagberg
Greenhorn
Joined: Jan 29, 2010
Posts: 12
|
|
They need to be on the same line like this:
|
 |
B Nirvan
Ranch Hand
Joined: Oct 20, 2010
Posts: 82
|
|
Thanks, but that doesn't work either.
regards,
Nirvan
|
 |
B Nirvan
Ranch Hand
Joined: Oct 20, 2010
Posts: 82
|
|
Is it possible to inject @Resource UserTransaction into a non-managed object (object created with new).
regards,
Nirvan.
|
 |
 |
|
|
subject: Injecting @Resource UserTransaction results in null
|
|
|