final String METHOD_NAME = "getNextPrintJob(): ";
QueuedPrintJob rval = null;
try {
QueuedObject queuedObject = (QueuedObject)queue.getNext();
long queueId = queuedObject.getId();
PrintJob printJob = (PrintJob)queuedObject.getObject();
// create a clone of the PrintJob for our return value
rval = new QueuedPrintJob(queueId, (PrintJob)printJob.clone());
} catch (ObjectNotFoundException e) {
log.info(METHOD_NAME + e.getMessage());
throw e;
}
return rval;