[jboss-jira] [JBoss JIRA] Assigned: (EJBTHREE-1863) res-type in resource-ref is not checked
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Fri Jul 3 03:14:51 EDT 2009
[ https://jira.jboss.org/jira/browse/EJBTHREE-1863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jaikiran pai reassigned EJBTHREE-1863:
--------------------------------------
Assignee: jaikiran pai
> res-type in resource-ref is not checked
> ---------------------------------------
>
> Key: EJBTHREE-1863
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-1863
> Project: EJB 3.0
> Issue Type: Bug
> Affects Versions: 1.1.7
> Reporter: Wolfgang Knauf
> Assignee: jaikiran pai
> Attachments: ResourceRef.ear
>
>
> The "res-type" of the "resource-ref" element in ejb-jar.xml is not verified.
> See the attached sample: neither on deploy nor on JNDI lookup, an error is raised for this xml snippet, which contains an invalid res-type:
> <resource-ref>
> <res-ref-name>EnvNameOfSessionContext1</res-ref-name>
> <res-type>whole.lotta.Crap</res-type>
> <mapped-name>java:comp/EJBContext</mapped-name>
> <injection-target>
> <injection-target-class>de.knauf.resourceref.ResourceRefTestBean</injection-target-class>
> <injection-target-name>sessionContext1</injection-target-name>
> </injection-target>
> </resource-ref>
> <resource-ref>
> <res-ref-name>EnvNameOfSessionContext2</res-ref-name>
> <res-type>whole.lotta.Crap</res-type>
> <mapped-name>java:comp/EJBContext</mapped-name>
> </resource-ref>
> The class org.jboss.injection.ResourceHandler.loadXmlResourceRefs almost completely ignores the "res-type" element ;-).
> For a "resource-env-ref" element, the "resource-env-ref-type" is validated, though maybe this happens by accident ;-):
> Caused by: java.lang.ClassNotFoundException: asdjavax.ejb.SessionContext from BaseClassLoader at 22adfd{...}
> at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Unknown Source)
> at org.jboss.injection.ResourceHandler.loadXmlResourceEnvRefs(ResourceHandler.java:217)
> ... 73 more
> So, I would like a similar check for the "resource-ref" res-type.
--
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