站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

PooledInvokerHA (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.invocation.pooled.server
Class PooledInvokerHA

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.invocation.pooled.server.PooledInvoker
              extended byorg.jboss.invocation.pooled.server.PooledInvokerHA
All Implemented Interfaces:
InvokerHA, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.invocation.pooled.server.PooledInvokerMBean, Runnable, org.jboss.system.Service, org.jboss.system.ServiceMBean

public final class PooledInvokerHA
extends org.jboss.invocation.pooled.server.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.

Author:
Bill Burke

Field Summary
protected  HashMap beanMap
           
 
Fields inherited from class org.jboss.invocation.pooled.server.PooledInvoker
acceptThreads, backlog, clientConnectAddress, clientConnectPort, clientMaxPoolSize, clientpool, enableTcpNoDelay, log, maxPoolSize, numAcceptThreads, optimizedInvokerProxy, running, serverBindAddress, serverBindPort, serverSocket, 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, getCurrentClientPoolSize, getCurrentThreadPoolSize, getMaxPoolSize, getNumAcceptThreads, getOptimizedInvokerProxy, getServerBindAddress, getServerBindPort, getSocketTimeout, getTransactionManagerService, importTPC, isEnableTcpNoDelay, run, setBacklog, setClientConnectAddress, setClientConnectPort, setClientMaxPoolSize, setEnableTcpNoDelay, setMaxPoolSize, setNumAcceptThreads, setServerBindAddress, setServerBindPort, setSocketTimeout, setTransactionManagerService, startService, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, 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, 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

beanMap

protected HashMap beanMap
Constructor Detail

PooledInvokerHA

public PooledInvokerHA()
Method Detail

jmxBind

protected void jmxBind()

getStub

public Serializable getStub()
Specified by:
getStub in interface InvokerHA

registerBean

public void registerBean(javax.management.ObjectName beanName,
                         HATarget target)
                  throws Exception
Specified by:
registerBean in interface InvokerHA
Throws:
Exception

createProxy

public org.jboss.invocation.Invoker createProxy(javax.management.ObjectName beanName,
                                                LoadBalancePolicy policy,
                                                String proxyFamilyName)
                                         throws Exception
Specified by:
createProxy in interface InvokerHA
Throws:
Exception

unregisterBean

public void unregisterBean(javax.management.ObjectName beanName)
                    throws Exception
Specified by:
unregisterBean in interface InvokerHA
Throws:
Exception

invoke

public Object invoke(org.jboss.invocation.Invocation invocation)
              throws Exception
Invoke a Remote interface method.

Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.