Examples of RemotingConnectionEJBReceiver


Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

        final IoFuture<Connection> futureConnection = endpoint.connect(connectionURI, builder.getMap(), new AuthenticationCallbackHandler(username, password));
        // wait for the connection to be established
        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));
    }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

            }
        } catch (Exception e) {
            logger.info("Could not create a connection for cluster node " + this.nodeName + " in cluster " + clusterContext.getClusterName(), e);
            return null;
        }
        return new RemotingConnectionEJBReceiver(connection, reconnectHandler, channelCreationOptions);
    }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

            }
            if (connection == null) {
                return;
            }
            try {
                final EJBReceiver ejbReceiver = new RemotingConnectionEJBReceiver(connection, this, channelCreationOptions);
                RemotingConnectionClusterNodeManager.this.clusterContext.registerEJBReceiver(ejbReceiver);
            } finally {
                // if we successfully re-connected then unregister this ReconnectHandler from the EJBClientContext
                RemotingConnectionClusterNodeManager.this.clusterContext.getEJBClientContext().unregisterReconnectHandler(this);
            }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

                // just log a message and register a reconnect handler
                logger.debug("Failed to create a connection for " + connectionName + ". A reconnect handler will be added to the client context", e);
                context.registerReconnectHandler(reconnectHandler);
                continue;
            }
            final RemotingConnectionEJBReceiver ejbReceiver = new RemotingConnectionEJBReceiver(connection, reconnectHandler, options);
            context.registerEJBReceiver(ejbReceiver);
            numRemotingReceivers++;
        }
        logger.debug("Added " + numRemotingReceivers + " remoting EJB receivers to descriptor based EJB client context " + startContext.getController().getName());
    }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

                final Connection connection = IoFutureHelper.get(futureConnection, connectionTimeout, TimeUnit.MILLISECONDS);
                logger.debug("Successful reconnect attempt#" + this.reconnectAttemptCount + " to outbound connection " + this.outboundConnectionServiceName);
                // successfully reconnected so unregister this reconnect handler
                this.clientContext.unregisterReconnectHandler(this);
                // register the newly reconnected connection
                final EJBReceiver receiver = new RemotingConnectionEJBReceiver(connection, this, channelCreationOpts);
                this.clientContext.registerEJBReceiver(receiver);
            } catch (Exception e) {
                logger.debug("Reconnect attempt#" + this.reconnectAttemptCount + " failed for outbound connection " + this.outboundConnectionServiceName, e);
            }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

                // just log a message and register a reconnect handler
                logger.debug("Failed to create a connection for " + connectionName + ". A reconnect handler will be added to the client context", e);
                context.registerReconnectHandler(reconnectHandler);
                continue;
            }
            final RemotingConnectionEJBReceiver ejbReceiver = new RemotingConnectionEJBReceiver(connection, reconnectHandler, options, outboundConnectionService.getProtocol());
            context.registerEJBReceiver(ejbReceiver);
            numRemotingReceivers++;
        }
        logger.debug("Added " + numRemotingReceivers + " remoting EJB receivers to descriptor based EJB client context " + startContext.getController().getName());
    }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

                final Connection connection = IoFutureHelper.get(futureConnection, connectionTimeout, TimeUnit.MILLISECONDS);
                logger.debug("Successful reconnect attempt#" + this.reconnectAttemptCount + " to outbound connection " + this.outboundConnectionServiceName);
                // successfully reconnected so unregister this reconnect handler
                this.clientContext.unregisterReconnectHandler(this);
                // register the newly reconnected connection
                final EJBReceiver receiver = new RemotingConnectionEJBReceiver(connection, this, channelCreationOpts, outboundConnectionService.getProtocol()); //TODO: FIXME
                this.clientContext.registerEJBReceiver(receiver);
            } catch (Exception e) {
                logger.debug("Reconnect attempt#" + this.reconnectAttemptCount + " failed for outbound connection " + this.outboundConnectionServiceName, e);
            }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

            }
        } catch (Exception e) {
            logger.info("Could not create a connection for cluster node " + this.nodeName + " in cluster " + clusterContext.getClusterName(), e);
            return null;
        }
        return new RemotingConnectionEJBReceiver(connection, reconnectHandler, channelCreationOptions, destinationProtocol);
    }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

            }
            if (connection == null) {
                return;
            }
            try {
                final EJBReceiver ejbReceiver = new RemotingConnectionEJBReceiver(connection, this, channelCreationOptions, "remote");
                RemotingConnectionClusterNodeManager.this.clusterContext.registerEJBReceiver(ejbReceiver);
            } finally {
                // if we successfully re-connected then unregister this ReconnectHandler from the EJBClientContext
                RemotingConnectionClusterNodeManager.this.clusterContext.getEJBClientContext().unregisterReconnectHandler(this);
            }
View Full Code Here

Examples of org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver

        final IoFuture<Connection> futureConnection = endpoint.connect(connectionURI, builder.getMap(), new AuthenticationCallbackHandler(username, password));
        // wait for the connection to be established
        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));
    }
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.