This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.

Boy Thomas

Greenhorn
+ Follow
since Apr 19, 2016
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Boy Thomas

I am getting the same error.
context.xml
--------------------
<Environment name="ets/pollInterval" value="4000000"
type="java.lang.String" override="false"/>
<Resource name="timer/TestTimer" auth="Container"
type="commonj.timers.TimerManager"/>

web.xml
--------------------
<resource-ref>
<res-ref-name>timer/TestTimer</res-ref-name>
<res-type>commonj.timers.TimerManager</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<env-entry>
<description>ETS Polling Interval, in milliseconds.</description>
<env-entry-name>ets/pollInterval</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>600000</env-entry-value>
</env-entry>

java class
--------------------
InitialContext ic = new InitialContext();
TimerManager tm = (TimerManager)ic.lookup
("java:comp/env/timer/TestTimer");
// Execute timer every 10 seconds starting immediately
tm.schedule (new MyTimerListener(), 0, 10*1000);
out.println("<h4>Timer scheduled!</h4>");

Any help is greatly appreciated.
6 years ago