Example usage for javax.ejb Timer getInfo

List of usage examples for javax.ejb Timer getInfo

Introduction

In this page you can find the example usage for javax.ejb Timer getInfo.

Prototype

public Serializable getInfo()
        throws java.lang.IllegalStateException, javax.ejb.NoSuchObjectLocalException, javax.ejb.EJBException;

Source Link

Document

Get the information associated with the timer at the time of creation.

Usage

From source file:ru.runa.wfe.service.impl.BotInvokerServiceBean.java

@WebMethod(exclude = true)
@Timeout//  www.  j a v  a  2s  . c  o m
public void timeOutHandler(Timer timer) {
    try {
        // refresh version and check that bot station exists
        BotStation botStation = Delegates.getBotService().getBotStation((Long) timer.getInfo());
        invokeBotsImpl(botStation, firstInvocation);
        firstInvocation = false;
    } catch (BotStationDoesNotExistException e) {
        log.warn("Cancelling periodic invocation due to: " + e);
        timer.cancel();
    }
}