users@glassfish.java.net

Re: Timer services in web applications?

From: <glassfish_at_javadesktop.org>
Date: Tue, 24 Nov 2009 22:55:28 PST

OK, I have read this section several times -- and the "example" fails to mention how the TimerService is obtained. If I put the following in my code:

    @Resource private TimerService ts;

I get a "JSF1001: Managedbean MyApp could not be created." as the result of the following exception:

Caused by: javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.app.MyApp/ts_at_Field-Injectable Resource. Class name = com.app.MyApp Field name=ts_at_java.lang.String_at_com.app.MyApp/ts@@ into class com.app.MyApp

Obviously I am missing some prerequisite, but no documentation is telling me.
[Message sent by forum member 'alan94539' ]

http://forums.java.net/jive/thread.jspa?messageID=373263