org.jboss.invocation.pooled.server
Class PooledInvokerHA
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.invocation.pooled.server.PooledInvoker
org.jboss.invocation.pooled.server.PooledInvokerHA
- All Implemented Interfaces:
- Runnable, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, InvokerHA, PooledInvokerMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean
public class PooledInvokerHA
- extends PooledInvoker
- implements InvokerHA
This invoker pools Threads and client connections to one server socket.
The purpose is to avoid a bunch of failings of RMI.
1. Avoid making a client socket connection with every invocation call.
This is very expensive. Also on windows if too many clients try
to connect at the same time, you get connection refused exceptions.
This invoker/proxy combo alleviates this.
2. Avoid creating a thread per invocation. The client/server connection
is preserved and attached to the same thread.
So we have connection pooling on the server and client side, and thread pooling
on the server side. Pool, is an LRU pool, so resources should be cleaned up.
- Version:
- $Revision: 81001 $
- Author:
- Bill Burke
Fields inherited from class org.jboss.invocation.pooled.server.PooledInvoker |
acceptThreads, backlog, clientConnectAddress, clientConnectPort, clientMaxPoolSize, clientpool, clientRetryCount, clientSocketFactory, clientSocketFactoryName, enableTcpNoDelay, log, maxPoolSize, numAcceptThreads, optimizedInvokerProxy, running, serverBindAddress, serverBindPort, serverSocket, serverSocketFactory, serverSocketFactoryName, sslDomain, threadpool, timeout, tpcFactory, tpcImporter, trace, transactionManagerService |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Methods inherited from class org.jboss.invocation.pooled.server.PooledInvoker |
destroyService, getBacklog, getClientConnectAddress, getClientConnectPort, getClientMaxPoolSize, getClientRetryCount, getClientSocketFactory, getClientSocketFactoryName, getCurrentClientPoolSize, getCurrentThreadPoolSize, getMaxPoolSize, getNumAcceptThreads, getOptimizedInvokerProxy, getServerBindAddress, getServerBindPort, getServerSocket, getServerSocketFactory, getServerSocketFactoryName, getSocketTimeout, getSslDomain, getTransactionManagerService, importTPC, isEnableTcpNoDelay, loadCustomSocketFactories, run, setBacklog, setClientConnectAddress, setClientConnectPort, setClientMaxPoolSize, setClientRetryCount, setClientSocketFactory, setClientSocketFactoryName, setEnableTcpNoDelay, setMaxPoolSize, setNumAcceptThreads, setServerBindAddress, setServerBindPort, setServerSocket, setServerSocketFactory, setServerSocketFactoryName, setSocketTimeout, setSslDomain, setTransactionManagerService, startService, stopService |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
beanMap
protected HashMap beanMap
PooledInvokerHA
public PooledInvokerHA()
jmxBind
protected void jmxBind()
- Overrides:
jmxBind
in class PooledInvoker
getStub
public Serializable getStub()
- Specified by:
getStub
in interface InvokerHA
registerBean
public void registerBean(ObjectName beanName,
org.jboss.ha.framework.server.HATarget target)
throws Exception
- Specified by:
registerBean
in interface InvokerHA
- Throws:
Exception
createProxy
public Invoker createProxy(ObjectName beanName,
LoadBalancePolicy policy,
String proxyFamilyName)
throws Exception
- Specified by:
createProxy
in interface InvokerHA
- Throws:
Exception
unregisterBean
public void unregisterBean(ObjectName beanName)
throws Exception
- Specified by:
unregisterBean
in interface InvokerHA
- Throws:
Exception
invoke
public Object invoke(Invocation invocation)
throws Exception
- Invoke a Remote interface method.
- Overrides:
invoke
in class PooledInvoker
- Throws:
Exception
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.