File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Websphere scheduler increase generated TaskId Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Websphere scheduler increase generated TaskId" Watch "Websphere scheduler increase generated TaskId" New topic

Websphere scheduler increase generated TaskId

David J Smith

Joined: Jun 09, 2009
Posts: 24
I have a WebSphere task scheduler set up and some other code that does various things involving scheduled tasks. To keep track of things I use the TaskId that is generated by WebSphere upon scheduling the task. This is all fine until I started messing around with the config. At some point the scheduler started creating task Ids that were lower than one's created in the past. This means my surrounding code gets confused by two of my 'tasks' referencing the same WebSphere task. Does anyone know how I can increase the WebSphere scheduler taskId generator value? At the moment I just have a horrible hack whereby I create and delete a load of tasks in order to increase the scheduler task id up to my last task id value. It's nasty but I can't see what else to do just now (I can't alter my tasks due to auditing).

Does anybody have any ideas?
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

It sounds like your code is making the assumption that the task numbers will continue to increase forever. Apparently that isn't a correct assumption. So you should fix your code to not make that assumption.
David J Smith

Joined: Jun 09, 2009
Posts: 24
You are correct, I am making that assumption however I need to in order to keep a handle on the Websphere task from my code. The problem is that websphere removes the tasks from the database once they are complete, does anyone know how to keep them in the table as complete, I guess it's not possible.
I agree. Here's the link:
subject: Websphere scheduler increase generated TaskId
It's not a secret anymore!