Open arinban opened 6 years ago
Comment by arinban Friday Feb 02, 2018 at 08:50 GMT
Original Issue:https://github.com/javaee/glassfish-genericjmsra/issues/7 Raised By:@glassfishrobot Created at:Fri Sep 23 08:28:25 IST 2005 Assigned To:@glassfishrobot
Comment by arinban Friday Feb 02, 2018 at 08:50 GMT
@glassfishrobot Commented on Fri Sep 23 08:28:25 IST 2005 Reported by gnt@java.net
Comment by arinban Friday Feb 02, 2018 at 08:50 GMT
@glassfishrobot Commented on Tue Oct 11 09:54:25 IST 2005 binod said: Added null checks for all types of ManagedConnectionFactories.
Comment by arinban Friday Feb 02, 2018 at 08:50 GMT
@glassfishrobot Commented on Fri Oct 14 06:25:29 IST 2005 binod said: Adding fixed1.0 keyword
Comment by arinban Friday Feb 02, 2018 at 08:51 GMT
@glassfishrobot Commented on Fri Sep 23 08:28:25 IST 2005 Was assigned to binod
Comment by arinban Friday Feb 02, 2018 at 08:51 GMT
@glassfishrobot Commented on Mon Apr 24 13:01:17 IST 2017 This issue was imported from java.net JIRA GENERICJMSRA-7
Issue by arinban Friday Feb 02, 2018 at 08:50 GMT Originally opened as https://github.com/arindam-bandyopadhyay/issue-test/issues/14
This issue has already been discussed on the mailing list, but i submit it here so that we can track it.
When no PasswordCredential can be retrieved in AbstractManagedConnectionFactory#createManagedConnection, the ManagedJMSConnectionFactory throws a NullPointerException in createXAConnection / createConnection. This can appear when the ra is used with jencks/spring outside any app server.
Here is a patch that makes it work:
protected javax.jms.XAConnection createXAConnection(PasswordCredential pc, javax.jms.ConnectionFactory cf ) throws JMSException { if (pc != null)
{ return ((XAConnectionFactory)cf).createXAConnection( pc.getUserName(), new String(pc.getPassword())); }
else
{ return ((XAConnectionFactory)cf).createXAConnection(); }
}
protected javax.jms.Connection createConnection(PasswordCredential pc, javax.jms.ConnectionFactory cf ) throws JMSException { if (pc != null)
{ return ((javax.jms.ConnectionFactory)cf).createConnection( pc.getUserName(), new String(pc.getPassword())); }
else
{ return ((javax.jms.ConnectionFactory)cf).createConnection(); }
}
Cheers, Guillaume Nodet
Environment
Operating System: All Platform: All
Affected Versions
[current]