Seam generates an UUID-based unique name for each job, there's no direct way of overriding this. Your alternatives are:
Use the patch found, this requires building a custom Seam library with the customized code added.
Override the OOTB quartz dispatcher with your own custom dispatcher, override the
scheduleWithQuartzService
method and use your own scheme for naming the job (look at the source code fororg.jboss.seam.async.QuartzDispatcher
you'll see that it calls anextUniqueName()
method that generates a new unique name for the job, you need to get the job name from elsewhere, eventually in the same way it is done in the patch you found, via an annotation).Instead of trying to see if the job is running based on its name, you can create a quartz event listener implementing
org.quartz.JobListener
and register when a job begins and ends execution in a global hashtable or something like that. Then you lookup the job in the hashtable to get its status rather than searching it by name. This however works only if your scheduler is not clustered (quartz will notify only the listener in the local node, other nodes will not know the job was triggered).