ari-ban / glassfish-genericjmsra

0 stars 0 forks source link

The user name and password is not being used from the com\sun\genericra\GenericJMSRAProperties.java class #61

Closed arinban closed 6 years ago

arinban commented 6 years ago

fixes.zip Code fixes are in classes, com\sun\genericra\outbound\ManagedJMSConnectionFactory.java, com\sun\genericra\outbound\ManagedQueueConnectionFactory.java and com\sun\genericra\outbound\ManagedTopicConnectionFactory.java

two method updates, the same change for all three classes (added <--- new line for the changes).

protected XAConnection createXAConnection(PasswordCredential pc, ConnectionFactory cf)
    throws JMSException
{
    if(pc != null && !pc.getUserName().equals(""))
        return ((XAConnectionFactory)cf).createXAConnection(pc.getUserName(), new String(pc.getPassword()));
    if(getUserName() != null && getPassword() != null)                                                       <--- new line
        return ((XAConnectionFactory)cf).createXAConnection(getUserName(), getPassword()); <--- new line
    else
        return ((XAConnectionFactory)cf).createXAConnection();
}

protected Connection createConnection(PasswordCredential pc, ConnectionFactory cf)
    throws JMSException
{
    if(pc != null && !pc.getUserName().equals(""))
        return cf.createConnection(pc.getUserName(), new String(pc.getPassword()));
    if(getUserName() != null && getPassword() != null)                                                       <---- new line
        return cf.createConnection(getUserName(), getPassword());                                       <---- new line
    else
        return cf.createConnection();
}
arinban commented 6 years ago
arinban commented 6 years ago

Closing this as this issue is migrated to https://github.com/ari-ban/test1/issues/61