Examples of BootstrapContext


Examples of javax.resource.spi.BootstrapContext

        // create a work manager which ActiveMQ uses to dispatch message delivery jobs
        final TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(transactionManager);
        final GeronimoWorkManager workManager = new GeronimoWorkManager(threadPool, threadPool, threadPool, Collections.<WorkContextHandler>singletonList(txWorkContextHandler));

        // wrap the work mananger and transaction manager in a bootstrap context (connector spec thing)
        final BootstrapContext bootstrapContext = new GeronimoBootstrapContext(workManager, transactionManager, transactionManager);

        // Create a ConnectionFactory
        connectionFactory = new ActiveMQConnectionFactory(brokerAddress);
        ra.setConnectionFactory(connectionFactory);
View Full Code Here

Examples of javax.resource.spi.BootstrapContext

        raBootstrapContext = ctx;
    }

    public WorkManager getWorkManager() {
        if (getBootstrapContext() instanceof BootstrapContext) {
            BootstrapContext context = (BootstrapContext)getBootstrapContext();
            return context.getWorkManager();
        }
        return null;
    }
View Full Code Here

Examples of javax.resource.spi.BootstrapContext

        }

        public void start() throws ResourceException {
            ExecutorFactory factory = broker.getContainer().getExecutorFactory();
            executor = factory.createExecutor("flow.jca." + spec.getDestination());
            BootstrapContext context = new SimpleBootstrapContext(new WorkManagerWrapper(executor));
            ra.start(context);
            spec.setResourceAdapter(ra);
            ra.endpointActivation(endpointFactory, spec);
        }
View Full Code Here

Examples of org.apache.drill.exec.server.BootStrapContext

      List<Integer> partitionRecordCounts = Lists.newArrayList();
      for(QueryResultBatch b : results) {
        if (b.getData() != null) {
          int rows = b.getHeader().getRowCount();
          count += rows;
          RecordBatchLoader loader = new RecordBatchLoader(new BootStrapContext(DrillConfig.create()).getAllocator());
          loader.load(b.getHeader().getDef(), b.getData());
          BigIntVector vv1 = (BigIntVector)loader.getValueAccessorById(BigIntVector.class, loader.getValueVectorId(
                  new SchemaPath("col1", ExpressionPosition.UNKNOWN)).getFieldIds()).getValueVector();
          Float8Vector vv2 = (Float8Vector)loader.getValueAccessorById(Float8Vector.class, loader.getValueVectorId(
                  new SchemaPath("col2", ExpressionPosition.UNKNOWN)).getFieldIds()).getValueVector();
View Full Code Here

Examples of org.jboss.as.console.client.core.BootstrapContext

    }

    @Override
    public void execute(final AsyncCallback<Boolean> callback) {

        BootstrapContext bootstrapContext = Console.getBootstrapContext();

        if(!bootstrapContext.isStandalone())
        {
            profileStore.loadProfiles(new SimpleCallback<List<ProfileRecord>>() {

                @Override
                public void onFailure(Throwable caught) {
View Full Code Here

Examples of org.jboss.as.console.client.core.BootstrapContext

        this.domainManager = domainManager;
    }

    @Override
    public void execute(final Control<BootstrapContext> control) {
        final BootstrapContext context = control.getContext();

        if(!context.isStandalone())
        {
            domainManager.getHosts(new SimpleCallback<HostList>() {

                @Override
                public void onFailure(Throwable caught) {
                    if(caught instanceof DomainEntityManager.NoHostsAvailable)
                    {
                        // this is expected (host scoped roles)
                        context.setHostManagementDisabled(true);
                        control.proceed();
                    }
                    else
                    {
                        context.setlastError(caught);
                        control.abort();
                    }
                }

                @Override
                public void onSuccess(HostList hostList) {
                    Log.info("Identified " + hostList.getHosts().size() + " hosts in this domain");
                    if(hostList.isEmpty()) {
                        context.setHostManagementDisabled(true);
                    }

                    Set<String> hosts = new TreeSet<String>();
                    for(Host host : hostList.getHosts()) hosts.add(host.getName());
                    control.getContext().setAddressableHosts(hosts);
View Full Code Here

Examples of org.jboss.as.console.client.core.BootstrapContext

        releaseVersion.get(ADDRESS).setEmptyList();
        steps.add(releaseVersion);
       
        operation.get(STEPS).set(steps);

        final BootstrapContext bootstrap = control.getContext();

        dispatcher.execute(new DMRAction(operation), new AsyncCallback<DMRResponse>() {
            @Override
            public void onFailure(Throwable caught) {

                bootstrap.setlastError(caught);
                Log.error(caught.getMessage());

                control.abort();
            }

            @Override
            public void onSuccess(DMRResponse result) {

                ModelNode response = result.get();

                if(response.isFailure())
                {
                    bootstrap.setlastError(new RuntimeException(response.getFailureDescription()));
                    control.abort();
                }
                else
                {

                    // capture exec mode
                    ModelNode execResult = response.get(RESULT).get("step-1");
                    boolean isServer = execResult.get(RESULT).asString().equals("Server");
                    bootstrap.setProperty(BootstrapContext.STANDALONE, Boolean.valueOf(isServer).toString());

                    ModelNode prodVersionResult = response.get(RESULT).get("step-2");
                    String prodVersion = prodVersionResult.get(RESULT).isDefined() ?
                            prodVersionResult.get(RESULT).asString() : "";

                    ModelNode releaseResult = response.get(RESULT).get("step-3");
                    String releaseVersion = releaseResult.get(RESULT).isDefined() ?
                            releaseResult.get(RESULT).asString() : "";

                    bootstrap.setReleaseVersion(releaseVersion);
                    bootstrap.setProdVersion(prodVersion);

                    control.proceed();
                }

View Full Code Here

Examples of org.jboss.as.console.client.core.BootstrapContext

    }

    @Override
    public void execute(final Control<BootstrapContext> control) {

        final BootstrapContext context = control.getContext();

        if(!context.isStandalone())
        {
            profileStore.loadProfiles(new SimpleCallback<List<ProfileRecord>>() {

                @Override
                public void onFailure(Throwable caught) {
                    context.setlastError(caught);
                    control.abort();
                }

                @Override
                public void onSuccess(List<ProfileRecord> result) {
View Full Code Here

Examples of org.jboss.as.console.client.core.BootstrapContext

        this.domainManager = domainManager;
    }

    @Override
    public void execute(final Control<BootstrapContext> control) {
        final BootstrapContext context = control.getContext();

        if(!context.isStandalone())
        {
            domainManager.getHosts(new SimpleCallback<HostList>() {

                @Override
                public void onFailure(Throwable caught) {
                    if(caught instanceof DomainEntityManager.NoHostsAvailable)
                    {
                        // this is expected (host scoped roles)
                        context.setHostManagementDisabled(true);
                        control.proceed();
                    }
                    else
                    {
                        context.setlastError(caught);
                        control.abort();
                    }
                }

                @Override
                public void onSuccess(HostList hostList) {
                    Log.info("Identified " + hostList.getHosts().size() + " hosts in this domain");
                    if(hostList.isEmpty()) {
                        context.setHostManagementDisabled(true);
                    }

                    Set<String> hosts = new HashSet<String>(hostList.getHosts().size());
                    for(Host host : hostList.getHosts()) hosts.add(host.getName());
                    control.getContext().setAddressableHosts(hosts);
View Full Code Here

Examples of org.jboss.as.console.client.core.BootstrapContext

        this.groupStore = groupStore;
    }

    @Override
    public void execute(final Control<BootstrapContext> control) {
        final BootstrapContext context = control.getContext();

        if(!context.isStandalone())
        {
            groupStore.loadServerGroups(new AsyncCallback<List<ServerGroupRecord>>() {
                @Override
                public void onFailure(Throwable caught) {
                    context.setlastError(caught);
                    control.abort();
                }

                @Override
                public void onSuccess(List<ServerGroupRecord> result) {
                    if(result.isEmpty())
                    {
                        context.setGroupManagementDisabled(true);
                    }

                    Set<String> groups = new HashSet<String>(result.size());
                    for(ServerGroupRecord group : result) groups.add(group.getName());
                    control.getContext().setAdressableGroups(groups);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.