|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.invocation.pooled.server.PooledInvoker
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 java.lang.Thread[] |
acceptThreads
|
protected int |
backlog
|
protected java.lang.String |
clientConnectAddress
The internet address client will use to connect to the sever. |
protected int |
clientConnectPort
The port a client will use to connect to the sever. |
protected int |
clientMaxPoolSize
|
protected LRUPool (src) |
clientpool
|
protected boolean |
enableTcpNoDelay
If the TcpNoDelay option should be used on the socket. |
protected static Logger (src) |
log
logger instance. |
protected int |
maxPoolSize
|
protected int |
numAcceptThreads
|
protected PooledInvokerProxy (src) |
optimizedInvokerProxy
|
protected boolean |
running
|
protected java.lang.String |
serverBindAddress
The internet address to bind to by default. |
protected int |
serverBindPort
The server port to bind to. |
protected java.net.ServerSocket |
serverSocket
|
protected java.util.LinkedList |
threadpool
|
protected int |
timeout
|
protected static TransactionPropagationContextFactory (src) |
tpcFactory
|
protected static TransactionPropagationContextImporter (src) |
tpcImporter
|
protected boolean |
trace
The logging trace level flag |
protected ObjectName (src) |
transactionManagerService
ObjectName of the transactionManagerService we use. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
PooledInvoker()
|
Method Summary | |
protected void |
destroyService()
Sub-classes should override this method to provide custum 'destroy' logic. |
int |
getBacklog()
|
java.lang.String |
getClientConnectAddress()
|
int |
getClientConnectPort()
|
int |
getClientMaxPoolSize()
Getter for property maxPoolSize; |
int |
getCurrentClientPoolSize()
|
int |
getCurrentThreadPoolSize()
|
int |
getMaxPoolSize()
Getter for property maxPoolSize; |
int |
getNumAcceptThreads()
Getter for property numAcceptThreads |
PooledInvokerProxy (src) |
getOptimizedInvokerProxy()
|
java.lang.String |
getServerBindAddress()
|
int |
getServerBindPort()
Getter for property serverBindPort. |
int |
getSocketTimeout()
Getter for property timeout |
ObjectName (src) |
getTransactionManagerService()
mbean get-set pair for field transactionManagerService Get the value of transactionManagerService |
protected Transaction (src) |
importTPC(java.lang.Object tpc)
|
java.lang.Object |
invoke(Invocation (src) invocation)
The ServerProtocol will use this method to service an invocation request. |
boolean |
isEnableTcpNoDelay()
|
protected void |
jmxBind()
|
void |
run()
|
void |
setBacklog(int backlog)
|
void |
setClientConnectAddress(java.lang.String clientConnectAddress)
|
void |
setClientConnectPort(int clientConnectPort)
|
void |
setClientMaxPoolSize(int clientMaxPoolSize)
Setter for property maxPoolSize. |
void |
setEnableTcpNoDelay(boolean enableTcpNoDelay)
|
void |
setMaxPoolSize(int maxPoolSize)
Setter for property maxPoolSize. |
void |
setNumAcceptThreads(int size)
Setter for property numAcceptThreads |
void |
setServerBindAddress(java.lang.String serverBindAddress)
|
void |
setServerBindPort(int serverBindPort)
Setter for property serverBindPort. |
void |
setSocketTimeout(int time)
Setter for property timeout |
void |
setTransactionManagerService(ObjectName (src) transactionManagerService)
Set the value of transactionManagerService |
void |
startService()
Starts this IL, and binds it to JNDI |
void |
stopService()
Stops this service, and unbinds it from JNDI. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
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 (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final Logger (src) log
protected boolean enableTcpNoDelay
protected java.lang.String serverBindAddress
protected int serverBindPort
protected java.lang.String clientConnectAddress
protected int clientConnectPort
protected int backlog
protected java.net.ServerSocket serverSocket
protected int timeout
protected int maxPoolSize
protected int clientMaxPoolSize
protected int numAcceptThreads
protected java.lang.Thread[] acceptThreads
protected LRUPool (src) clientpool
protected java.util.LinkedList threadpool
protected boolean running
protected boolean trace
protected ObjectName (src) transactionManagerService
transactionManagerService
we use.
Probably should not be here -- used to set txInterceptor tx mananger.
protected PooledInvokerProxy (src) optimizedInvokerProxy
protected static TransactionPropagationContextFactory (src) tpcFactory
protected static TransactionPropagationContextImporter (src) tpcImporter
Constructor Detail |
public PooledInvoker()
Method Detail |
protected void jmxBind()
public void startService() throws java.lang.Exception
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
- Description of Exceptionpublic void run()
run
in interface java.lang.Runnable
public void stopService() throws java.lang.Exception
stopService
in class ServiceMBeanSupport (src)
java.lang.Exception
protected void destroyService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
destroyService
in class ServiceMBeanSupport (src)
java.lang.Exception
public java.lang.Object invoke(Invocation (src) invocation) throws java.lang.Exception
java.lang.Exception
protected Transaction (src) importTPC(java.lang.Object tpc)
public int getNumAcceptThreads()
public void setNumAcceptThreads(int size)
size
- New value of property numAcceptThreads.public int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
maxPoolSize
- New value of property serverBindPort.public int getClientMaxPoolSize()
public void setClientMaxPoolSize(int clientMaxPoolSize)
clientMaxPoolSize
- New value of property serverBindPort.public int getSocketTimeout()
public void setSocketTimeout(int time)
time
- New value of property timeoutpublic int getCurrentClientPoolSize()
public int getCurrentThreadPoolSize()
public int getServerBindPort()
public void setServerBindPort(int serverBindPort)
serverBindPort
- New value of property serverBindPort.public java.lang.String getClientConnectAddress()
public void setClientConnectAddress(java.lang.String clientConnectAddress)
public int getClientConnectPort()
public void setClientConnectPort(int clientConnectPort)
public int getBacklog()
public void setBacklog(int backlog)
public boolean isEnableTcpNoDelay()
public void setEnableTcpNoDelay(boolean enableTcpNoDelay)
public java.lang.String getServerBindAddress()
public void setServerBindAddress(java.lang.String serverBindAddress)
public ObjectName (src) getTransactionManagerService()
public void setTransactionManagerService(ObjectName (src) transactionManagerService)
transactionManagerService
- Value to assign to transactionManagerServicepublic PooledInvokerProxy (src) getOptimizedInvokerProxy()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |