You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Alexander (JIRA)" <ji...@apache.org> on 2009/12/29 21:05:29 UTC
[jira] Created: (OPENEJB-1125) Injection of
TransactionSynchronizationRegistry using @Resource
Injection of TransactionSynchronizationRegistry using @Resource
---------------------------------------------------------------
Key: OPENEJB-1125
URL: https://issues.apache.org/jira/browse/OPENEJB-1125
Project: OpenEJB
Issue Type: Improvement
Components: container system
Affects Versions: 3.1.2
Environment: WinXP, Java 5
Reporter: Alexander
Priority: Minor
Hello Everyone,
I would like to get the TransactionSynchronizationRegistry injected.
@Resource(name="java:comp/TransactionSynchronizationRegistry")
private TransactionSynchronizationRegistry registry;
but this does not work - with or without the "name" Attribute.
Instead, I have to execute the following
InitialContext ictx = new
registry = (TransactionSynchronizationRegistry) ictx.lookup("java:comp/TransactionSynchronizationRegistry");
The Message is as follows:
WARN - Jar not loaded. classpath.ear. No provider available for resource-ref 'null' of type 'javax.transaction.TransactionSynchronizationRegistry' for 'CompensationTestImpl'.
org.apache.openejb.OpenEJBException: No provider available for resource-ref 'null' of type 'javax.transaction.TransactionSynchronizationRegistry' for 'CompensationTestImpl'.
at org.apache.openejb.config.AutoConfig.autoCreateResource(AutoConfig.java:1342)
at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1335)
at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1286)
at org.apache.openejb.config.AutoConfig.processResourceRef(AutoConfig.java:799)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:724)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:133)
....
Best regards,
Alexander
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.