// allocate instance of endpoint to figure out its endpoint interface
Class clazz = QuartzJob.class;
MessageEndpoint tmpMe = endpointFactory.createEndpoint(null);
if (tmpMe instanceof StatefulJob) clazz = StatefulQuartzJob.class;
tmpMe.release();
try
{
JobDetail jobDetail = new JobDetail(quartzSpec.getJobName(), quartzSpec.getJobGroup(), clazz, true, false, false);
jobDetail.getJobDataMap().setAllowsTransientData(true);