Skip to content
Snippets Groups Projects
Commit ece58d1d authored by tonschnoer's avatar tonschnoer
Browse files

updated project settings

fixed code assist issues
parent 4612faa9
No related branches found
No related tags found
No related merge requests found
......@@ -14,15 +14,15 @@
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
......@@ -31,7 +31,7 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
......
package de.kmt.ndr;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import jakarta.annotation.Resource;
import jakarta.ejb.ScheduleExpression;
import jakarta.ejb.Singleton;
import jakarta.ejb.Startup;
import jakarta.ejb.Timeout;
import jakarta.ejb.Timer;
import jakarta.ejb.TimerConfig;
import jakarta.ejb.TimerService;
@Singleton
@Startup
public class Main {
@Resource
private TimerService timerService;
private void _setUP() {
}
@Timeout
public void scheduler(Timer timer) {
try {
_setUP();
System.out.println("Timer fired.");
}
catch(Exception _ex) {
}
}
@PostConstruct
public void initialize() {
try {
_setUP();
ScheduleExpression se = new ScheduleExpression();
se.hour("*").minute("0/1").second("0/1");
timerService.createCalendarTimer(se, new TimerConfig("ARD-ZDF-Box Cleanup Service scheduled at ", false));
}
catch(Exception _ex) {
}
}
@PreDestroy
public void stop() {
try {
_setUP();
for (Timer timer : timerService.getTimers()) {
timer.cancel();
}
}
catch(Exception _ex) {
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment