[jboss-user] [EJB 3.0] - Potential Spec violation in TimerService
mkleiderman
do-not-reply at jboss.com
Tue Jan 30 21:18:30 EST 2007
Here's the body of org.jboss.ejb.txtimer.TimerServiceImpl's createTimer method:
| if (initialExpiration == null)
| throw new IllegalArgumentException("initial expiration is null");
| if (intervalDuration < 0)
| throw new IllegalArgumentException("interval duration is negative");
|
| try
| {
| String timerId = timerIdGenerator.nextTimerId();
| TimerImpl timer = new TimerImpl(this, timerId, timedObjectId, timedObjectInvoker, info);
| persistencePolicy.insertTimer(timerId, timedObjectId, initialExpiration, intervalDuration, info);
| timer.startTimer(initialExpiration, intervalDuration);
| return timer;
| }
| catch (Exception e)
| {
| log.error("Cannot create txtimer", e);
| return null;
| }
|
The Sun API documentation for this method says to throw javax.ejb.EJBException if the method fails due to a system-level failure, not return null.
Should I file this in Jira?
- Matt Kleiderman
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008602#4008602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008602
More information about the jboss-user
mailing list