| Method from org.jboss.mq.SpyConnectionFactory Detail: |
public Connection createConnection() throws JMSException {
return internalCreateConnection(SpyConnection.UNIFIED);
}
|
public Connection createConnection(String userName,
String password) throws JMSException {
return internalCreateConnection(SpyConnection.UNIFIED, userName, password);
}
|
public QueueConnection createQueueConnection() throws JMSException {
return (QueueConnection) internalCreateConnection(SpyConnection.QUEUE);
}
|
public QueueConnection createQueueConnection(String userName,
String password) throws JMSException {
return (QueueConnection) internalCreateConnection(SpyConnection.QUEUE, userName, password);
}
|
public TopicConnection createTopicConnection() throws JMSException {
return (TopicConnection) internalCreateConnection(SpyConnection.TOPIC);
}
|
public TopicConnection createTopicConnection(String userName,
String password) throws JMSException {
return (TopicConnection) internalCreateConnection(SpyConnection.TOPIC, userName, password);
}
|
public Properties getProperties() {
if (factory == null)
return null;
else
return factory.getProperties();
}
|
public Reference getReference() throws NamingException {
return new Reference("org.jboss.mq.SpyConnectionFactory", new ObjectRefAddr("DCF", factory),
"org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory", null);
}
|
protected Connection internalCreateConnection(int type) throws JMSException {
try
{
return new SpyConnection(type, factory);
}
catch (JMSException e)
{
throw e;
}
catch (Exception e)
{
throw new SpyJMSException("Failed to create Connection", e);
}
}
|
protected Connection internalCreateConnection(int type,
String userName,
String password) throws JMSException {
try
{
if (userName == null)
throw new SpyJMSException("Username is null");
if (password == null)
throw new SpyJMSException("Password is null");
return new SpyConnection(type, userName, password, factory);
}
catch (JMSException e)
{
throw e;
}
catch (Exception e)
{
throw new SpyJMSException("Failed to create Connection", e);
}
}
|