Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add externalid #151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions api/src/main/java/jakarta/ejb/TimerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ public void setInfo(Serializable i) {
info_ = i;
}

/**
* Set externalid.
*
* @param externalId external id.
*/
public void setExternalId(String externalId) {
this.externalId = externalId;
}

/**
* Return the <code>externalId</code>.
*
* @return externalId
*/
public Serializable getExternalId() {
return externalId;
}

/**
* Return the <code>info</code> object made available to timer callbacks.
*
Expand Down Expand Up @@ -100,4 +118,5 @@ public String toString() {

private boolean persistent_ = true;

private String externalId;
}
13 changes: 13 additions & 0 deletions api/src/main/java/jakarta/ejb/TimerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,19 @@ public Timer createCalendarTimer(ScheduleExpression schedule, TimerConfig timerC
public Collection<Timer> getTimers() throws java.lang.IllegalStateException,
jakarta.ejb.EJBException;

/**
* Returns all active timers associated with this bean matching externalId. These include both the programmatically-created timers and the
* automatically-created timers.
*
* @param externalId external id to look for.
* @return a collection of <code>jakarta.ejb.Timer</code> objects.
* @exception java.lang.IllegalStateException If this method is invoked while the instance is in a state that does not
* allow access to this method.
* @throws jakarta.ejb.EJBException If this method could not complete due to a system-level failure.
*/
public Collection<Timer> getTimersbyExternalId(String externalId) throws java.lang.IllegalStateException,
jakarta.ejb.EJBException;

/**
* Returns all active timers associated with the beans in the same module in which the caller bean is packaged. These
* include both the programmatically-created timers and the automatically-created timers.
Expand Down