History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-11520
Type: Bug Bug
Status: Open Open
Assignee: Gregory Shrago
Reporter: Chris Hagmann
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Incorrect detection of "more than one dependency injection is configured for field/method"

Created: 13 Feb 07 19:56   Updated: 13 Feb 07 19:59
Component/s: Editor. Error Highlighting

Build: 6,148
Severity: Medium


 Description  « Hide
If the same bean implementation class (e.g. a generic MDB) is configured as multiple MDBs (in ejb-jar.xml) then fields which are injection targets are incorrectly flagged with "more than one dependency injection is configured for field/method". This applies to resources and ejb references.
"MyBean.java"
public class MyBean implements MessageListener {

    /**
     * Injection target
     */
    String workflowAction = null;

....
}
ejb-jar.xml"
<message-driven>
      <ejb-name>MyMDB1</ejb-name>
      <mapped-name>jms/queue1</mapped-name>
      <ejb-class>foobar.MyBean</ejb-class>
      <transaction-type>Container</transaction-type>
      <env-entry>
        <env-entry-name>workflowAction</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>persist</env-entry-value>
        <injection-target>
          <injection-target-class>foobar.MyBean</injection-target-class>
          <injection-target-name>workflowAction</injection-target-name>
        </injection-target>
      </env-entry>
     </message-driven>

   <message-driven>
      <ejb-name>MyMDB2</ejb-name>
      <mapped-name>jms/queue2</mapped-name>
      <ejb-class>foobar.MyBean</ejb-class>
      <transaction-type>Container</transaction-type>
      <env-entry>
        <env-entry-name>workflowAction</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>clear</env-entry-value>
        <injection-target>
          <injection-target-class>foobar.MyBean</injection-target-class>
          <injection-target-name>workflowAction</injection-target-name>
        </injection-target>
      </env-entry>
     </message-driven>


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.