return new TibcoEMSAdmin(hermes, this);
}
TibjmsAdmin createAdmin(ConnectionFactory connectionFactory) throws JMSException
{
TibjmsAdmin admin = null;
try
{
if (connectionFactory instanceof JNDIConnectionFactory)
{
final JNDIConnectionFactory jndiCF = (JNDIConnectionFactory) connectionFactory;
if (username == null && jndiCF.getSecurityPrincipal() != null)
{
username = jndiCF.getSecurityCredentials();
if (password == null && jndiCF.getSecurityCredentials() != null)
{
password = jndiCF.getSecurityCredentials();
}
}
admin = new TibjmsAdmin(serverURL == null ? jndiCF.getProviderURL() : serverURL, username, password);
}
else if (connectionFactory instanceof TibjmsConnectionFactory)
{
final TibjmsConnectionFactory tibCF = (TibjmsConnectionFactory) connectionFactory;
final Map ssl = getSSLParameters(tibCF);
serverURL = serverURL == null ? (String) BeanUtils.getProperty(tibCF, "serverUrl") : serverURL;
username = username == null ? (String) BeanUtils.getProperty(tibCF, "userName") : username;
password = password == null ? (String) BeanUtils.getProperty(tibCF, "userPassword") : password;
if (ssl.size() == 0)
{
admin = new TibjmsAdmin(serverURL, username, password);
}
else
{
admin = new TibjmsAdmin(serverURL, username, password, ssl);
}
}
if (admin == null)