/** * Builds the BootstrapContext and starts the ResourceAdapter with it. * @see javax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext) */ @Override public void afterPropertiesSet() throws ResourceException { if (this.resourceAdapter == null) { throw new IllegalArgumentException("'resourceAdapter' or 'resourceAdapterClass' is required"); } if (this.bootstrapContext == null) { this.bootstrapContext = new SimpleBootstrapContext(this.workManager, this.xaTerminator); } this.resourceAdapter.start(this.bootstrapContext); }
/** * Builds the BootstrapContext and starts the ResourceAdapter with it. * @see javax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext) */ @Override public void afterPropertiesSet() throws ResourceException { if (this.resourceAdapter == null) { throw new IllegalArgumentException("'resourceAdapter' or 'resourceAdapterClass' is required"); } if (this.bootstrapContext == null) { this.bootstrapContext = new SimpleBootstrapContext(this.workManager, this.xaTerminator); } this.resourceAdapter.start(this.bootstrapContext); }
/** * called by connector runtime to start the resource-adapter java bean * @param bootstrapContext BootstrapContext * @throws ResourceAdapterInternalException */ protected void startResourceAdapter(BootstrapContext bootstrapContext) throws ResourceAdapterInternalException { resourceadapter_.start(bootstrapContext); }
/** * Adds a resource to the resource manager. */ private void addResourceImpl(ResourceAdapter resource) { try { resource.start(this); } catch (Exception e) { log.log(Level.WARNING, e.toString(), e); } _resources.add(resource); }
public void doStart() throws Exception { // if we have a validator factory at this point, then validate // the resource adaptor instance if (validatorFactory != null) { Validator validator = validatorFactory.getValidator(); Set generalSet = validator.validate(resourceAdapter); if (!generalSet.isEmpty()) { throw new ConstraintViolationException("Constraint violation for ResourceAdapter " + resourceAdapterClass, generalSet); } } resourceAdapter.start(bootstrapContext); }
/** * Builds the BootstrapContext and starts the ResourceAdapter with it. * @see javax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext) */ @Override public void afterPropertiesSet() throws ResourceException { if (this.resourceAdapter == null) { throw new IllegalArgumentException("'resourceAdapter' or 'resourceAdapterClass' is required"); } if (this.bootstrapContext == null) { this.bootstrapContext = new SimpleBootstrapContext(this.workManager, this.xaTerminator); } this.resourceAdapter.start(this.bootstrapContext); }
/** * Builds the BootstrapContext and starts the ResourceAdapter with it. * @see javax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext) */ @Override public void afterPropertiesSet() throws ResourceException { if (this.resourceAdapter == null) { throw new IllegalArgumentException("'resourceAdapter' or 'resourceAdapterClass' is required"); } if (this.bootstrapContext == null) { this.bootstrapContext = new SimpleBootstrapContext(this.workManager, this.xaTerminator); } this.resourceAdapter.start(this.bootstrapContext); }
public void afterPropertiesSet() throws Exception { if (resourceAdapter == null) { throw new IllegalArgumentException("resourceAdapter must be set"); } if (bootstrapContext == null) { if (transactionManager == null) { throw new IllegalArgumentException("bootstrapContext or transactionManager must be set"); } if (workManager == null) { workManager = GeronimoDefaults.createWorkManager(transactionManager, threadPoolSize); createdWorkManager = true; } bootstrapContext = GeronimoDefaults.createBootstrapContext(transactionManager, workManager); } resourceAdapter.start(bootstrapContext); // now lets start all of the JCAConnector instances if (!lazyLoad) { if (applicationContext == null) { throw new IllegalArgumentException("applicationContext should have been set by Spring"); } applicationContext.getBeansOfType(JCAConnector.class); } String version = null; Package aPackage = Package.getPackage("org.jencks"); if (aPackage != null) { version = aPackage.getImplementationVersion(); } log.info("Jencks JCA Container (http://jencks.org/) has started running version: " + version); }
protected void startService() throws Exception { URL url = cmd.getURL(); if (cmd.getLicense().getRequired()) { log.info ("Required license terms exist, view " + ServerConfigUtil.shortUrlFromServerHome(url.toString())); log.debug("License terms full URL: " + url); } resourceAdapter = ResourceAdapterFactory.createResourceAdapter(rdmd); resourceAdapter.start(this); }
/** * Starts the resource adapter */ private void start() { if (! _lifecycle.toActive()) return; if (_ra != null) return; _ra = (ResourceAdapter) _beanManager.getReference(_comp); try { _ra.start(ResourceManagerImpl.create()); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new StartLifecycleException(e); } }
public void start() throws Exception { transactionManager = (TransactionManager) context.getTransactionManager(); endpointFactory = new SingletonEndpointFactory(this, transactionManager); bootstrapContext = endpoint.getBootstrapContext(); if (bootstrapContext == null) { throw new IllegalArgumentException("bootstrapContext not set"); } connectionFactory = endpoint.getConnectionFactory(); if (connectionFactory == null) { throw new IllegalArgumentException("connectionFactory not set"); } activationSpec = endpoint.getActivationSpec(); if (activationSpec == null) { throw new IllegalArgumentException("activationSpec not set"); } resourceAdapter = endpoint.getResourceAdapter(); if (resourceAdapter == null) { resourceAdapter = activationSpec.getResourceAdapter(); if (resourceAdapter == null) { throw new IllegalArgumentException("resourceAdapter not set"); } } else if (activationSpec.getResourceAdapter() == null) { activationSpec.setResourceAdapter(resourceAdapter); } resourceAdapter.start(bootstrapContext); resourceAdapter.endpointActivation(endpointFactory, activationSpec); }
resourceAdapter.start(bootstrapContext); } catch (final ResourceAdapterInternalException e) { throw new OpenEJBException(e);
@InitMethod public void start() throws ResourceException, IOException { setClassLoader(createClassLoader()); loadDeploymentDescripter(); raConfig.putProperties(configProperties); ra = createResourceAdapter(); ra.start(bc); if (logger.isDebugEnabled()) { loggingDeployedMessage(); } }
resourceAdapter.start(bootstrapContext); } catch (final ResourceAdapterInternalException e) { throw new OpenEJBException(e);
resourceAdapter.start(bootstrapContext); } catch (ResourceAdapterInternalException e) { throw new OpenEJBException(e);
public synchronized void start() throws Exception { if (bootstrapContext == null) { Executor executor = getServiceUnit().getComponent().getExecutor(MessageExchange.Role.CONSUMER); WorkManager wm = new WorkManagerWrapper(executor); bootstrapContext = new SimpleBootstrapContext(wm); } resourceAdapter.start(bootstrapContext); activationSpec.setResourceAdapter(resourceAdapter); if (endpointFactory == null) { TransactionManager tm = (TransactionManager) getContext().getTransactionManager(); endpointFactory = new SingletonEndpointFactory(new MessageListener() { public void onMessage(Message message) { try { JmsJcaConsumerEndpoint.this.onMessage(message, null); } catch (JMSException e) { throw new ListenerExecutionFailedException("Unable to handle message", e); } } }, tm); } resourceAdapter.endpointActivation(endpointFactory, activationSpec); super.start(); }