[jboss-cvs] JBossAS SVN: r74065 - projects/ejb3/trunk/core/src/main/java/org/jboss/injection.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 3 22:38:39 EDT 2008
Author: scott.stark at jboss.org
Date: 2008-06-03 22:38:38 -0400 (Tue, 03 Jun 2008)
New Revision: 74065
Modified:
projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java
Log:
EJBTHREE-1391, handle TimerService types correctly
Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java 2008-06-04 02:32:48 UTC (rev 74064)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/injection/ResourceHandler.java 2008-06-04 02:38:38 UTC (rev 74065)
@@ -147,6 +147,26 @@
encName = "java:comp/UserTransaction";
}
}
+ else if (TimerService.class.getName().equals(envRef.getType()))
+ {
+ final Container ic = (Container) container;
+ InjectorFactory<?> factory = new InjectorFactory<TimerServicePropertyInjector>()
+ {
+ public TimerServicePropertyInjector create(BeanProperty property)
+ {
+ return new TimerServicePropertyInjector(property, ic);
+ }
+ };
+ if(envRef.getInjectionTargets() != null)
+ {
+ InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
+ continue;
+ }
+ else
+ {
+ encName = "java:comp/TimerService";
+ }
+ }
else if (ORB.class.getName().equals(envRef.getType()))
{
encName = "java:comp/ORB";
@@ -209,6 +229,26 @@
mappedName = "java:comp/UserTransaction";
}
}
+ else if (resType.equals(TimerService.class))
+ {
+ final Container ic = (Container) container;
+ InjectorFactory<?> factory = new InjectorFactory<TimerServicePropertyInjector>()
+ {
+ public TimerServicePropertyInjector create(BeanProperty property)
+ {
+ return new TimerServicePropertyInjector(property, ic);
+ }
+ };
+ if(envRef.getInjectionTargets() != null)
+ {
+ InjectionUtil.createInjectors(container.getInjectors(), container.getClassloader(), factory, envRef.getInjectionTargets());
+ continue;
+ }
+ else
+ {
+ mappedName = "java:comp/TimerService";
+ }
+ }
else if (resType.equals(ORB.class))
{
mappedName = "java:comp/ORB";
More information about the jboss-cvs-commits
mailing list