log.debug("endpointActivation, spec="+spec); MailActivationSpec mailSpec = (MailActivationSpec) spec; MailActivation activation = new MailActivation(this, endpointFactory, mailSpec); try { newMsgsWorker.watch(activation); } catch (InterruptedException e) { throw new ResourceException("Failed to schedule new msg check", e); } activations.put(spec, activation);
log.debug("endpointDeactivation, spec="+spec); MailActivation activation = (MailActivation) activations.remove(spec); if (activation != null) activation.release();
Get the work managerreturnthe work manager return ctx.getWorkManager();
return ctx.getWorkManager();
return new XAResource[0];
log.debug("start"); this.ctx = ctx; WorkManager mgr = ctx.getWorkManager(); newMsgsWorker = new NewMsgsWorker(mgr); try { mgr.scheduleWork(newMsgsWorker); } catch (WorkException e) { throw new ResourceAdapterInternalException(e); }
log.debug("stop"); newMsgsWorker.release();