schedule « ejb « Java Enterprise Q&A





1. EJB 3.1 timer rollback exception    stackoverflow.com

I've been getting a load of rollbackexception when calling some SELECT JPQL or namedqueries from a Singleton. The Singleton as one method with the @Schedule annotation calling the some others db query ...

2. Can the EJB 3.1 @Schedule be configured outside of the application code?    stackoverflow.com

How can I configure a schedule intervals: @Schedule(persistent=true, minute="*", second="*/5", hour="*") outside of the application code?

  1. How can I configure it in ejb-jar.xml?
  2. Can I configure it outside the application (kind of properties file)?

3. Using @RunAs in my EJB Schedulers    stackoverflow.com

I have many EJBs with my business methods. These methods use @RolesAllowed annotation to check if user can execute this method. So I have an EJB Scheduler that calls these EJB methods. ...

4. @Schedule methods in EJBs aren't executing after Exceptions    stackoverflow.com

I've got a method in a Java EE6 Singleton Session Bean which is called by a @Schedule(...) timer every 30 seconds. This works as expected until an exception is thrown and ...

5. @Schedule annotation in Java EE    stackoverflow.com

I use the following annotation to call a stateless session bean once a 5 minutes:

@Schedule(second = "0", minute = "0/5", hour = "*")
I works as expected, except it stops itself after ...

6. Have an EJB schedule tasks with "crontab syntax"    stackoverflow.com

I am trying to figure out the possibilities I have to solve the following problem. a) I want to have a database table that uses "crontab syntax" to schedule tasks, the structure ...

7. Why is Jboss passing null Timer object to method annotated with @Timeout?    stackoverflow.com

I have a stateless bean which manages my timer service:

@Stateless
@Depends("jboss.ha:service=HASingletonDeployer,type=Barrier")
public class TimerManagerBean implements ITimerManagerLocal {

private static final Logger log = Logger.getLogger(TimerManagerBean.class);
private @Resource
SessionContext ctx;

private @EJB ISomeEjbLocal someEjb;

public void scheduleTimer(long initialDuration, long intervalDuration, ...

8. EJB stateless - Private members initialisation    stackoverflow.com

I'm new to EJB and I'm facing my first problem. I'm trying to use an @Schedule method contained in a Stateless EJB. I'd like this method to use a private member ...

9. How to I make this Timer Service Class handle the "change in scheduled time"?    stackoverflow.com

Sample Code:

@Singleton @Startup public class EBlastScheduler {
@Resource
TimerService timerService;
EBlastScheduler what = new EBlastScheduler();
@PostConstruct
public void initialize(){
   if (timerService.getTimers() != null) {
     ...





10. Can I be sure that a SLSB which created a Timer will be handling its timeout (Java EE 5)?    stackoverflow.com

In Java EE 5, when using timers and the timer service, who handles the timeout invocation?
Can I be sure that the stateless session bean which created the timer wil be the ...