/** * Specify the JCA BootstrapContext that contains the * WorkManager to delegate to. */ @Override public void setBootstrapContext(BootstrapContext bootstrapContext) { Assert.notNull(bootstrapContext, "BootstrapContext must not be null"); this.workManager = bootstrapContext.getWorkManager(); }
/** * Specify the JCA BootstrapContext that contains the * WorkManager to delegate to. */ @Override public void setBootstrapContext(BootstrapContext bootstrapContext) { Assert.notNull(bootstrapContext, "BootstrapContext must not be null"); this.workManager = bootstrapContext.getWorkManager(); }
public void start(BootstrapContext ctx) throws ResourceAdapterInternalException { try { Class.forName(ORG_CAMUNDA_BPM_ENGINE_PROCESS_ENGINE); } catch (Exception e) { log.info("ProcessEngine classes not found in shared libraries. Not initializing camunda Platform JobExecutor Resource Adapter."); return; } // initialize the ExecutorService (CommonJ or JCA, depending on configuration) if(isUseCommonJWorkManager) { if(commonJWorkManagerName != null & commonJWorkManagerName.length() > 0) { executorServiceWrapper.setExecutorService(new CommonJWorkManagerExecutorService(this, commonJWorkManagerName)); } else { throw new RuntimeException("Resource Adapter configuration property 'isUseCommonJWorkManager' is set to true but 'commonJWorkManagerName' is not provided."); } } else { executorServiceWrapper.setExecutorService(new JcaWorkManagerExecutorService(this, ctx.getWorkManager())); } log.log(Level.INFO, "camunda BPM executor service started."); }
/** * Get the work manager * * @return the work manager */ public WorkManager getWorkManager() { return ctx.getWorkManager(); }
/** * Returns the work manager. */ WorkManager getWorkManager() { return _ctx.getWorkManager(); }
/** * Get the work manager * * @return the work manager */ public WorkManager getWorkManager() { return ctx.getWorkManager(); }
/** * Get the work manager * * @return the work manager */ public WorkManager getWorkManager() { return ctx.getWorkManager(); }
/** * Specify the JCA BootstrapContext that contains the * WorkManager to delegate to. */ @Override public void setBootstrapContext(BootstrapContext bootstrapContext) { Assert.notNull(bootstrapContext, "BootstrapContext must not be null"); this.workManager = bootstrapContext.getWorkManager(); }
/** * Specify the JCA BootstrapContext that contains the * WorkManager to delegate to. */ @Override public void setBootstrapContext(BootstrapContext bootstrapContext) { Assert.notNull(bootstrapContext, "BootstrapContext must not be null"); this.workManager = bootstrapContext.getWorkManager(); }
/** * Get the work manager * * @return The manager */ public WorkManager getWorkManager() { if (logger.isTraceEnabled()) { logger.trace("getWorkManager()"); } if (ctx == null) { return null; } return ctx.getWorkManager(); }
@Override public void start(BootstrapContext ctx) throws ResourceAdapterInternalException { if (workManager != null) throw new ResourceAdapterInternalException("Can only start once"); workManager = ctx.getWorkManager(); }
public WorkManager getWorkManager() { if (resourceAdapter instanceof ResourceAdapterImpl) { return ((ResourceAdapterImpl)resourceAdapter).getBootstrapContext() .getWorkManager(); } return null; }
@Override public CompletableFuture<Void> onMessageAsync(IMessage im) { CompletableFuture<Void> result = new CompletableFuture<>(); try { context.getWorkManager().scheduleWork(new AzureSBWork(endpointFactory, im)); } catch (WorkException ex) { Logger.getLogger(AzureSBListener.class.getName()).log(Level.SEVERE, "Exception receoving message", ex); result.completeExceptionally(ex); } result.complete(null); return result; }
@Override public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) throws ResourceException { // build a client and associate with the factory MQTTSubscriber subscriber = new MQTTSubscriber(endpointFactory, spec, context.getWorkManager()); registeredFactories.put(endpointFactory, subscriber); subscriber.subscribe(); }
public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) throws ResourceException { if (!(as instanceof MDBActivationSpec)) { LOG.fine("Ignored unknown activation spec " + as); return; } MDBActivationSpec spec = (MDBActivationSpec)as; LOG.info("CXF resource adapter is activating " + spec.getDisplayName()); Work work = new MDBActivationWork(spec, mef, endpoints); ctx.getWorkManager().scheduleWork(work); }
/** * Initializes the adapter; starts, if needed, a collocated JORAM server, * and if needed again, administers it. * * @exception ResourceAdapterInternalException If the adapter could not be * initialized. */ public synchronized void start(BootstrapContext ctx) throws ResourceAdapterInternalException { setWorkManager(ctx.getWorkManager()); start(); }
/** * Initializes the adapter * * @exception ResourceAdapterInternalException If the adapter could not be * initialized. */ public synchronized void start(BootstrapContext ctx) throws ResourceAdapterInternalException { setWorkManager(ctx.getWorkManager()); start(); }
public void start(BootstrapContext bsContext) throws ResourceAdapterInternalException { try { this.xaFileSystem = NativeXAFileSystem.bootXAFileSystem(this, bsContext.getWorkManager()); } catch (XASystemException xase) { throw new ResourceAdapterInternalException(xase); } }
public WorkManager getWorkManager() { if (getBootstrapContext() instanceof BootstrapContext) { BootstrapContext context = (BootstrapContext)getBootstrapContext(); return context.getWorkManager(); } return null; }
/** * Initializes the adapter; starts, if needed, a collocated JORAM server, * and if needed again, administers it. * * @exception ResourceAdapterInternalException If the adapter could not be * initialized. */ public synchronized void start(BootstrapContext ctx) throws ResourceAdapterInternalException { setWorkManager(ctx.getWorkManager()); start(); }