[jboss-jira] [JBoss JIRA] Created: (JBAS-7835) "ignore-dependency" injection from jboss.xml not work in bean with superclass'es
Krashan Brahmanjara (JIRA)
jira-events at lists.jboss.org
Mon Mar 22 10:49:38 EDT 2010
"ignore-dependency" injection from jboss.xml not work in bean with superclass'es
--------------------------------------------------------------------------------
Key: JBAS-7835
URL: https://jira.jboss.org/jira/browse/JBAS-7835
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossAS-5.1.0.GA
Environment: jboss-5.1.0.GA with jdk1.6.0_17
Reporter: Krashan Brahmanjara
Priority: Minor
I got bean based on superclass with shared logic and some circular dependencies
Unfortunately "ignore-dependency" injection from jboss.xml seems to work only if attributes are declared in current class not in superclass'es - I can't use annotations because ear is praparet for weblogic too.
Error example : org.jboss.deployers.spi.DeploymentException: Error deploying test.jar: Unable to create annotation for method/field defBean for EJB AlgBean
Deployment "vfszip:test.ear/" is in error due to the following reason(s): java.lang.NoSuchFieldException: defBean
for case :
<?xml version="1.0" encoding="UTF-8" ?>
<jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
version="3.0">
<enterprise-beans>
<session>
<ejb-name>AlgBean</ejb-name>
<ignore-dependency>
<injection-target>
<injection-target-class>test.DefLocal</injection-target-class>
<injection-target-name>defBean</injection-target-name>
</injection-target>
</ignore-dependency>
</session>
</enterprise-beans>
</jboss>
@Stateless(name = "AlgBean", mappedName = "ejb.DefAlg")
public class AlgBean extends AlgBeanImpl implements DefAlgLocal,DefAlgRemote {
}
public class AlgBeanImpl implements DefAlg {
@EJB
protected DefLocal defBean;
}
There are no problems is DefLocal defBean is moved from superclass to AlgBean.
--
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