|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.invocation.pooled.server.PooledInvoker
org.jboss.invocation.pooled.server.PooledInvokerHA
public final class PooledInvokerHA
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.
Field Summary | |
---|---|
protected HashMap |
beanMap
|
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 class org.jboss.system.ServiceMBeanSupport |
---|
server, SERVICE_CONTROLLER_SIG, serviceName |
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 |
Constructor Summary | |
---|---|
PooledInvokerHA()
|
Method Summary | |
---|---|
org.jboss.invocation.Invoker |
createProxy(javax.management.ObjectName beanName,
LoadBalancePolicy policy,
String proxyFamilyName)
|
Serializable |
getStub()
|
Object |
invoke(org.jboss.invocation.Invocation invocation)
Invoke a Remote interface method. |
protected void |
jmxBind()
|
void |
registerBean(javax.management.ObjectName beanName,
HATarget target)
|
void |
unregisterBean(javax.management.ObjectName beanName)
|
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, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Field Detail |
---|
protected HashMap beanMap
Constructor Detail |
---|
public PooledInvokerHA()
Method Detail |
---|
protected void jmxBind()
jmxBind
in class org.jboss.invocation.pooled.server.PooledInvoker
public Serializable getStub()
getStub
in interface InvokerHA
public void registerBean(javax.management.ObjectName beanName, HATarget target) throws Exception
registerBean
in interface InvokerHA
Exception
public org.jboss.invocation.Invoker createProxy(javax.management.ObjectName beanName, LoadBalancePolicy policy, String proxyFamilyName) throws Exception
createProxy
in interface InvokerHA
Exception
public void unregisterBean(javax.management.ObjectName beanName) throws Exception
unregisterBean
in interface InvokerHA
Exception
public Object invoke(org.jboss.invocation.Invocation invocation) throws Exception
invoke
in class org.jboss.invocation.pooled.server.PooledInvoker
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |