throw new NamingException("providerURL (" + providerURL + ") is malformed, format is wme://brokerName@hostname:port");
}
try
{
BrokerConnectionDescriptor bcd = new BrokerConnectionDescriptor();
bcd.setConnectionShare(true);
try
{
bcd.setConnectionShareLimit(100); // some arbitary number to handle concurrent connection.
}
catch (NoSuchMethodError ex)
{
// Old version of WebMethods
}
bcd.setSharedEventOrdering(BrokerConnectionDescriptor.SHARED_ORDER_NONE);
BrokerAdminClient adminClient = BrokerAdminClient.newOrReconnectAdmin(hostName + ":" + port, brokerName, "admin" + System.currentTimeMillis(), "admin",
WMEInitialContextFactory.class.getName(), bcd);
Context ctx = new ContextImpl(environment);