"each Connection Factory");
}
String locatorURI = (String)JMXAccessor.getJMXAttributeOverSecurity(server, connectorObjectName, "InvokerLocator");
ServerPeer serverPeer = (ServerPeer)JMXAccessor.getJMXAttributeOverSecurity(server, serverPeerObjectName, "Instance");
if (!serverPeer.isSupportsFailover())
{
this.supportsFailover = false;
}
InvokerLocator locator = new InvokerLocator(locatorURI);
String protocol = locator.getProtocol();
if (!disableRemotingChecks && (protocol.equals("bisocket") || protocol.equals("sslbisocket")))
{
//Sanity check - If users are using the AS Service Binding Manager to provide the remoting connector
//configuration, it is quite easy for them to end up using an old version depending on what version on
//the AS they are running in - e.g. if they have forgotten to update it.
//This can lead to subtle errors - therefore we do a sanity check by checking the existence of some properties
//which should always be there
Map params = locator.getParameters();
//The "compulsory" parameters
boolean cont =
checkParam(params, "marshaller", "org.jboss.jms.wireformat.JMSWireFormat") &&
checkParam(params, "unmarshaller", "org.jboss.jms.wireformat.JMSWireFormat") &&
checkParam(params, "dataType", "jms") &&
checkParam(params, "clientSocketClass", "org.jboss.jms.client.remoting.ClientSocketWrapper") &&
checkParam(params, "numberOfCallRetries", "1") &&
checkParam(params, "pingFrequency", "214748364") &&
checkParam(params, "pingWindowFactor", "10");
if (!cont)
{
throw new IllegalArgumentException("Failed to deploy connection factory since remoting configuration seems incorrect.");
}
String val = (String)params.get("clientLeasePeriod");
if (val != null)
{
int i = Integer.parseInt(val);
if (i < 5000)
{
log.warn("Value of clientLeasePeriod at " + i + " seems low. Normal values are >= 5000");
}
}
val = (String)params.get("JBM_clientMaxPoolSize");
if (val != null)
{
int i = Integer.parseInt(val);
if (i < 50)
{
log.warn("Value of JBM_clientMaxPoolSize at " + i + " seems low. Normal values are >= 50");
}
}
}
connectionFactoryManager = serverPeer.getConnectionFactoryManager();
connectorManager = serverPeer.getConnectorManager();
connectionManager = serverPeer.getConnectionManager();
int refCount = connectorManager.registerConnector(connectorObjectName.getCanonicalName());
long leasePeriod = (Long)JMXAccessor.getJMXAttributeOverSecurity(server, connectorObjectName, "LeasePeriod");