[jboss-cvs] JBossAS SVN: r60455 - branches/Branch_4_2/ejb3/src/main/org/jboss/injection.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 8 20:40:03 EST 2007
Author: bdecoste
Date: 2007-02-08 20:40:02 -0500 (Thu, 08 Feb 2007)
New Revision: 60455
Modified:
branches/Branch_4_2/ejb3/src/main/org/jboss/injection/DependsHandler.java
Log:
fix and test for @Depends and @EJB on same field or method
Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/injection/DependsHandler.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/injection/DependsHandler.java 2007-02-09 01:37:31 UTC (rev 60454)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/injection/DependsHandler.java 2007-02-09 01:40:02 UTC (rev 60455)
@@ -63,7 +63,11 @@
{
throw new RuntimeException(e);
}
- injectors.put(method, new DependsMethodInjector(method, on));
+
+ // don't replace other injections
+ if (injectors.get(method) == null)
+ injectors.put(method, new DependsMethodInjector(method, on));
+
container.getDependencyPolicy().addDependency(names[0]);
}
}
@@ -85,7 +89,10 @@
{
throw new RuntimeException(e);
}
- injectors.put(field, new DependsFieldInjector(field, on));
+ // don't replace other injections
+ if (injectors.get(field) == null)
+ injectors.put(field, new DependsFieldInjector(field, on));
+
container.getDependencyPolicy().addDependency(names[0]);
}
}
More information about the jboss-cvs-commits
mailing list