Examples of registerEJBReceiver()


Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

        final Connection connection = IoFutureHelper.get(futureConnection, 5000, TimeUnit.MILLISECONDS);
        // create a remoting EJB receiver for this connection
        final EJBReceiver receiver = new RemotingConnectionEJBReceiver(connection);
        // associate it with the client context
        EJBClientContext context = EJBClientContext.create();
        context.registerEJBReceiver(receiver);
        return EJBClientContext.setSelector(new ClosableContextSelector(context, endpoint, connection, receiver));
    }

    private class ClosableContextSelector implements ContextSelector<EJBClientContext>, Closeable {
        private EJBClientContext context;
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

            context = EJBClientContext.create(this.ejbClientConfiguration);
        }
        // add the (optional) local EJB receiver
        final LocalEjbReceiver localEjbReceiver = this.localEjbReceiverInjectedValue.getOptionalValue();
        if (localEjbReceiver != null) {
            context.registerEJBReceiver(localEjbReceiver);
            logger.debug("Added a local EJB receiver to descriptor based EJB client context named " + startContext.getController().getName());
        }
        // now process the remoting receivers
        this.registerRemotingEJBReceivers(startContext, context);
        // we now have a fully configured EJB client context for use
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

    public synchronized void start(final StartContext context) throws StartException {
        final EJBClientContext clientContext = EJBClientContext.create(new LocalOnlyEjbClientConfiguration());
        // register the default local EJB receiver (if present - app clients don't have local EJB receivers)
        final LocalEjbReceiver localEjbReceiver = this.defaultLocalEJBReceiver.getOptionalValue();
        if (localEjbReceiver != null) {
            clientContext.registerEJBReceiver(localEjbReceiver);
        }
        this.context = clientContext;
        if (this.lockSelectorOnStart) {
            // lock the EJB client context selector
            AccessController.doPrivileged(new LockSelectorAction());
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

    @Override
    public synchronized void start(final StartContext context) throws StartException {
        final EJBClientContext clientContext = EJBClientContext.create();
        for (final InjectedValue<EJBReceiver> receiver : ejbReceivers) {
            clientContext.registerEJBReceiver(receiver.getValue());
        }
        this.context = clientContext;
        // setup the client context selector
        // TODO: We set this up here, for now. But we need to rethink about how we are going to
        // handle manual overrides of EJB client context selector by user code on the server side.
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

            context = EJBClientContext.create(this.ejbClientConfiguration);
        }
        // add the (optional) local EJB receiver
        final LocalEjbReceiver localEjbReceiver = this.localEjbReceiverInjectedValue.getOptionalValue();
        if (localEjbReceiver != null) {
            context.registerEJBReceiver(localEjbReceiver);
            logger.debug("Added a local EJB receiver to descriptor based EJB client context named " + startContext.getController().getName());
        }
        // now process the remoting receivers
        this.registerRemotingEJBReceivers(startContext, context);
        // we now have a fully configured EJB client context for use
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

    public synchronized void start(final StartContext context) throws StartException {
        final EJBClientContext clientContext = EJBClientContext.create(new LocalOnlyEjbClientConfiguration(), this.getClass().getClassLoader());
        // register the default local EJB receiver (if present - app clients don't have local EJB receivers)
        final LocalEjbReceiver localEjbReceiver = this.defaultLocalEJBReceiver.getOptionalValue();
        if (localEjbReceiver != null) {
            clientContext.registerEJBReceiver(localEjbReceiver);
        }
        this.context = clientContext;
        if (this.lockSelectorOnStart) {
            // lock the EJB client context selector
            AccessController.doPrivileged(new LockSelectorAction());
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

        final Connection connection = IoFutureHelper.get(futureConnection, 5000, TimeUnit.MILLISECONDS);
        // create a remoting EJB receiver for this connection
        final EJBReceiver receiver = new RemotingConnectionEJBReceiver(connection);
        // associate it with the client context
        EJBClientContext context = EJBClientContext.create();
        context.registerEJBReceiver(receiver);
        return EJBClientContext.setSelector(new ClosableContextSelector(context, endpoint, connection, receiver));
    }

    private class ClosableContextSelector implements ContextSelector<EJBClientContext>, Closeable {
        private EJBClientContext context;
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

        // setup the context with the receivers
        final EJBClientContext context = EJBClientContext.create();
        // add the (optional) local EJB receiver
        final LocalEjbReceiver localEjbReceiver = this.localEjbReceiverInjectedValue.getOptionalValue();
        if (localEjbReceiver != null) {
            context.registerEJBReceiver(localEjbReceiver);
            logger.debug("Added a local EJB receiver to descriptor based EJB client context named " + startContext.getController().getName());
        }
        // now process the remoting receivers
        final Collection<Connection> connections = this.createRemotingConnections();
        for (final Connection conection : connections) {
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

    public synchronized void start(final StartContext context) throws StartException {
        final EJBClientContext clientContext = EJBClientContext.create();
        // register the default local EJB receiver (if present - app clients don't have local EJB receivers)
        final LocalEjbReceiver localEjbReceiver = this.defaultLocalEJBReceiver.getOptionalValue();
        if (localEjbReceiver != null) {
            clientContext.registerEJBReceiver(localEjbReceiver);
        }
        this.context = clientContext;
        if (this.lockSelectorOnStart) {
            // lock the EJB client context selector
            AccessController.doPrivileged(new LockSelectorAction());
View Full Code Here

Examples of org.jboss.ejb.client.EJBClientContext.registerEJBReceiver()

        // setup the context with the receivers
        final EJBClientContext context = EJBClientContext.create(this.ejbClientConfiguration);
        // add the (optional) local EJB receiver
        final LocalEjbReceiver localEjbReceiver = this.localEjbReceiverInjectedValue.getOptionalValue();
        if (localEjbReceiver != null) {
            context.registerEJBReceiver(localEjbReceiver);
            logger.debug("Added a local EJB receiver to descriptor based EJB client context named " + startContext.getController().getName());
        }
        final ServiceRegistry serviceRegistry = startContext.getController().getServiceContainer();
        // now process the remoting receivers
        final Collection<Connection> connections = this.createRemotingConnections(serviceRegistry, context);
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.