[jboss-jira] [JBoss JIRA] Updated: (EJBTHREE-1431) @Resource Injection fails when jboss.xml declares resource-ref/jndi-name, expecting mapped-name
Andrew Lee Rubinger (JIRA)
jira-events at lists.jboss.org
Sat Jan 10 01:33:04 EST 2009
[ https://jira.jboss.org/jira/browse/EJBTHREE-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Lee Rubinger updated EJBTHREE-1431:
------------------------------------------
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
EJBTHREE-1673 will enable this to be tested in Unit Tests, so we don't rely on integration tests
> @Resource Injection fails when jboss.xml declares resource-ref/jndi-name, expecting mapped-name
> -----------------------------------------------------------------------------------------------
>
> Key: EJBTHREE-1431
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-1431
> Project: EJB 3.0
> Issue Type: Bug
> Components: core
> Affects Versions: AS 5.0.0.CR1
> Reporter: Andrew Lee Rubinger
> Assignee: Andrew Lee Rubinger
> Attachments: test-mapped-name.jar
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> Using jboss.xml:
> <jboss>
> <enterprise-beans>
> <session>
> <ejb-name>TestBean</ejb-name>
> <jndi-name>local/base/Test</jndi-name>
> <local-jndi-name>local/base/Test</local-jndi-name>
> <resource-ref>
> <res-ref-name>com.promca.test.ejb.Test/datasource</res-ref-name>
> <jndi-name>java:/DefaultDS</jndi-name>
> </resource-ref>
> </session>
> </enterprise-beans>
> </jboss>
> ..and Injection:
> @Stateless
> public class TestBean implements Test {
> @Resource
> private DataSource datasource;
> public void execute() {
> System.out.println("Executing...");
> }
> }
> Error is:
> Caused by: java.lang.RuntimeException: mapped-name is required for datasource of deployment TestBean
> at org.jboss.injection.ResourceHandler.loadXmlResourceRefs(ResourceHandler.java:176)
> at org.jboss.injection.ResourceHandler.loadXml(ResourceHandler.java:327)
> at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:561)
> at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:392)
> at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:505)
> at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:185)
> ... 21 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list