Timer service maximum interval is 2147483647 (Integer.MAX_VALUE) - Websphere

This is a discussion on Timer service maximum interval is 2147483647 (Integer.MAX_VALUE) - Websphere ; Hi, Looks like the WAS timer service maximum interval when creating a timer is Integer.MAX_VALUE, even though the parameter for the interval is a long. For example: if from an EJB you call sessionContext.getTimerService().createTimer(new Date(), Integer.MAX_VALUE, "will work"); you'll have ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Timer service maximum interval is 2147483647 (Integer.MAX_VALUE)

  1. Timer service maximum interval is 2147483647 (Integer.MAX_VALUE)

    Hi,



    Looks like the WAS timer service maximum interval when creating a timer is Integer.MAX_VALUE, even though the parameter for the interval is a long.



    For example: if from an EJB you call



    sessionContext.getTimerService().createTimer(new Date(), Integer.MAX_VALUE, "will work");



    you'll have no problems, but if we change this to:



    sessionContext.getTimerService().createTimer(new Date(), Integer.MAX_VALUE+1, "won't work");


    you'll get a beautiful exception like this one:



    5/8/08 14:34:47:437 VET 000001ed SystemErr R Caused by: com.ibm.websphere.scheduler.UserCalendarPeriodInva lid: SCHD0119E: Invalid numeric value specified: For input string: "2147483648".

    at com.ibm.ws.scheduler.calendar.DefaultUserCalendarB ean.handleTerm(DefaultUserCal endarBean.java:81)

    at com.ibm.ws.scheduler.calendar.DefaultUserCalendarB ean.applyDelta(DefaultUserCal endarBean.java:121)

    at com.ibm.ws.scheduler.calendar.DefaultUserCalendarB ean.validate(DefaultUserCalen darBean.java:60)

    at com.ibm.ws.scheduler.UserCalendarHolder.validate(U serCalendarHolder.java:123)
    at com.ibm.ws.scheduler.AbstractTask.validate(Abstrac tTask.java:553)

    at com.ibm.ws.scheduler.SchedulerImpl$1.run(Scheduler Impl.java:675)

    at java.security.AccessController.doPrivileged(Access Controller.java:241)

    at com.ibm.ws.scheduler.SchedulerImpl.updateOrCreate( SchedulerImpl.java:604)

    at com.ibm.ws.scheduler.SchedulerImpl.create(Schedule rImpl.java:565)

    at com.ibm.ejs.container.TimerImpl. (TimerImpl.java:122)

    at com.ibm.ejs.container.BeanO.createTimer(BeanO.java :1545)

    at com.codetel.epg.tool.ejb.SchedulesBeanImpl.addSche dule(SchedulesBeanImpl.java:7 7)

    at com.codetel.epg.tool.ejb.EJSRemoteStatelessSchedul eEJB_b8191dd8.addSchedule(Unk nown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:64)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.ja va:43)

    at java.lang.reflect.Method.invoke(Method.java:615)

    at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:72 7)

    at java.security.AccessController.doPrivileged(Access Controller.java:241)

    at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders( ProxyUtil.java:725)

    at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1123)

    at $Proxy10.addSchedule(Unknown Source)

    at com.codetel.epg.tool.ejb._SchedulesBean_Stub.addSc hedule(_SchedulesBean_Stub.ja va:270)

    at com.codetel.epg.tool.schedule.ScheduleManager.crea teSchedule(ScheduleManager.ja va:68)

    at com.codetel.epg.tool.action.DoCreateImportSchedule s.execute(DoCreateImportSched ules.java:35)

    at org.apache.struts.chain.commands.servlet.ExecuteAc tion.execute(ExecuteAction.ja va:58)

    at org.apache.struts.chain.commands.AbstractExecuteAc tion.execute(AbstractExecuteA ction.java:67)

    at org.apache.struts.chain.commands.ActionCommandBase .execute(ActionCommandBase.ja va:51)

    at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)

    at org.apache.commons.chain.generic.LookupCommand.exe cute(LookupCommand.java:304)
    at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)

    at org.apache.struts.chain.ComposableRequestProcessor .process(ComposableRequestPro cessor.java:283)

    at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1913)

    at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:462)

    at javax.servlet.http.HttpServlet.service(HttpServlet .java:763)

    at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)

    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:966)

    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:907)

    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.jav a:145)

    at com.codetel.epg.tool.auth.AuthenticationFilter.doF ilter(AuthenticationFilter.ja va:41)

    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapp er.doFilter(FilterInstanceWra pper.java:190)

    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.jav a:130)

    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._ doFilter(WebAppFilterChain.ja va:87)

    at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager .java:696)

    at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager .java:641)

    at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.jav a:475)

    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.h andleRequest(ServletWrapper.j ava:463)

    at com.ibm.ws.webcontainer.servlet.CacheServletWrappe r.handleRequest(CacheServletW rapper.java:92)

    at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:744)

    at com.ibm.ws.wswebcontainer.WebContainer.handleReque st(WebContainer.java:1425)

    at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:92)

    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpI nboundLink.java:465)

    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpI nboundLink.java:394)

    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCa llback.complete(HttpICLReadCa llback.java:102)

    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCo mpletionListener.java:152)

    at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:21 3)

    at com.ibm.io.async.AbstractAsyncFuture.fireCompletio nActions(AbstractAsyncFuture. java:195)

    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:136)

    at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:193)

    at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:725)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:847)

    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1498)


    Apparently they have this DefaultUserCalendarBean, along the way messing things up, taking a simple long value, converting it to String and the parsing it as a Integer , even though the timer accepts longs.



    I think this probably is a break of the J2EE timer standard since, why would you accept longs but only support until ints.



    Do any of you guys know if this is a programming bug in WAS that should be corrected or something else ?



    Thanks

  2. Re: Timer service maximum interval is 2147483647 (Integer.MAX_VALUE)

    To me, this looks like a bug. I suggest you open a PMR with IBM Support.

    michael.calcano@gmail.com wrote:
    > Hi,
    >
    >
    >
    > Looks like the WAS timer service maximum interval when creating a timer is Integer.MAX_VALUE, even though the parameter for the interval is a long.
    >
    >
    >
    > For example: if from an EJB you call
    >
    >
    >
    > sessionContext.getTimerService().createTimer(new Date(), Integer.MAX_VALUE, "will work");
    >
    >
    >
    > you'll have no problems, but if we change this to:
    >
    >
    >
    > sessionContext.getTimerService().createTimer(new Date(), Integer.MAX_VALUE+1, "won't work");
    >
    >
    > you'll get a beautiful exception like this one:
    >
    >
    >
    > 5/8/08 14:34:47:437 VET 000001ed SystemErr R Caused by: com.ibm.websphere.scheduler.UserCalendarPeriodInva lid: SCHD0119E: Invalid numeric value specified: For input string: "2147483648".
    >
    > at com.ibm.ws.scheduler.calendar.DefaultUserCalendarB ean.handleTerm(DefaultUserCal endarBean.java:81)
    >
    > at com.ibm.ws.scheduler.calendar.DefaultUserCalendarB ean.applyDelta(DefaultUserCal endarBean.java:121)
    >
    > at com.ibm.ws.scheduler.calendar.DefaultUserCalendarB ean.validate(DefaultUserCalen darBean.java:60)
    >
    > at com.ibm.ws.scheduler.UserCalendarHolder.validate(U serCalendarHolder.java:123)
    > at com.ibm.ws.scheduler.AbstractTask.validate(Abstrac tTask.java:553)
    >
    > at com.ibm.ws.scheduler.SchedulerImpl$1.run(Scheduler Impl.java:675)
    >
    > at java.security.AccessController.doPrivileged(Access Controller.java:241)
    >
    > at com.ibm.ws.scheduler.SchedulerImpl.updateOrCreate( SchedulerImpl.java:604)
    >
    > at com.ibm.ws.scheduler.SchedulerImpl.create(Schedule rImpl.java:565)
    >
    > at com.ibm.ejs.container.TimerImpl. (TimerImpl.java:122)
    >
    > at com.ibm.ejs.container.BeanO.createTimer(BeanO.java :1545)
    >
    > at com.codetel.epg.tool.ejb.SchedulesBeanImpl.addSche dule(SchedulesBeanImpl.java:7 7)
    >
    > at com.codetel.epg.tool.ejb.EJSRemoteStatelessSchedul eEJB_b8191dd8.addSchedule(Unk nown Source)
    >
    > at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    >
    > at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:64)
    > at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.ja va:43)
    >
    > at java.lang.reflect.Method.invoke(Method.java:615)
    >
    > at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:72 7)
    >
    > at java.security.AccessController.doPrivileged(Access Controller.java:241)
    >
    > at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders( ProxyUtil.java:725)
    >
    > at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDel egate.java:1123)
    >
    > at $Proxy10.addSchedule(Unknown Source)
    >
    > at com.codetel.epg.tool.ejb._SchedulesBean_Stub.addSc hedule(_SchedulesBean_Stub.ja va:270)
    >
    > at com.codetel.epg.tool.schedule.ScheduleManager.crea teSchedule(ScheduleManager.ja va:68)
    >
    > at com.codetel.epg.tool.action.DoCreateImportSchedule s.execute(DoCreateImportSched ules.java:35)
    >
    > at org.apache.struts.chain.commands.servlet.ExecuteAc tion.execute(ExecuteAction.ja va:58)
    >
    > at org.apache.struts.chain.commands.AbstractExecuteAc tion.execute(AbstractExecuteA ction.java:67)
    >
    > at org.apache.struts.chain.commands.ActionCommandBase .execute(ActionCommandBase.ja va:51)
    >
    > at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
    >
    > at org.apache.commons.chain.generic.LookupCommand.exe cute(LookupCommand.java:304)
    > at org.apache.commons.chain.impl.ChainBase.execute(Ch ainBase.java:190)
    >
    > at org.apache.struts.chain.ComposableRequestProcessor .process(ComposableRequestPro cessor.java:283)
    >
    > at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1913)
    >
    > at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:462)
    >
    > at javax.servlet.http.HttpServlet.service(HttpServlet .java:763)
    >
    > at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    >
    > at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:966)
    >
    > at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:907)
    >
    > at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.jav a:145)
    >
    > at com.codetel.epg.tool.auth.AuthenticationFilter.doF ilter(AuthenticationFilter.ja va:41)
    >
    > at com.ibm.ws.webcontainer.filter.FilterInstanceWrapp er.doFilter(FilterInstanceWra pper.java:190)
    >
    > at com.ibm.ws.webcontainer.filter.WebAppFilterChain.d oFilter(WebAppFilterChain.jav a:130)
    >
    > at com.ibm.ws.webcontainer.filter.WebAppFilterChain._ doFilter(WebAppFilterChain.ja va:87)
    >
    > at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager .java:696)
    >
    > at com.ibm.ws.webcontainer.filter.WebAppFilterManager .doFilter(WebAppFilterManager .java:641)
    >
    > at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.jav a:475)
    >
    > at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.h andleRequest(ServletWrapper.j ava:463)
    >
    > at com.ibm.ws.webcontainer.servlet.CacheServletWrappe r.handleRequest(CacheServletW rapper.java:92)
    >
    > at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:744)
    >
    > at com.ibm.ws.wswebcontainer.WebContainer.handleReque st(WebContainer.java:1425)
    >
    > at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:92)
    >
    > at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpI nboundLink.java:465)
    >
    > at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpI nboundLink.java:394)
    >
    > at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCa llback.complete(HttpICLReadCa llback.java:102)
    >
    > at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCo mpletionListener.java:152)
    >
    > at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:21 3)
    >
    > at com.ibm.io.async.AbstractAsyncFuture.fireCompletio nActions(AbstractAsyncFuture. java:195)
    >
    > at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:136)
    >
    > at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:193)
    >
    > at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:725)
    > at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:847)
    >
    > at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1498)
    >
    >
    > Apparently they have this DefaultUserCalendarBean, along the way messing things up, taking a simple long value, converting it to String and the parsing it as a Integer , even though the timer accepts longs.
    >
    >
    >
    > I think this probably is a break of the J2EE timer standard since, why would you accept longs but only support until ints.
    >
    >
    >
    > Do any of you guys know if this is a programming bug in WAS that should be corrected or something else ?
    >
    >
    >
    > Thanks


+ Reply to Thread