mirror of https://github.com/apache/activemq.git
Fix for problem reported by: Christopher G. Stach II
We're using Resin and trying to use 4.0-RC2. It just so happens that Resin makes this call in ConnectionPool.init(ManagedConnectionFactory): ManagedConnection mConn = mcf.createManagedConnection(subject, null); So, eventually that null info gets dereferenced and BOOM! com.caucho.server.webapp.Application.start java.lang.NullPointerException at org.apache.activemq.ra.ActiveMQResourceAdapter.createConnectionFactory(ActiveMQResourceAdapter.java:156) at org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:100) at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:103) at com.caucho.jca.ConnectionPool.init(ConnectionPool.java:462) git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@392556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9cd60d8c5d
commit
67064db832
|
@ -99,6 +99,9 @@ public class ActiveMQManagedConnectionFactory implements ManagedConnectionFactor
|
|||
*/
|
||||
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException {
|
||||
try {
|
||||
if( info == null ) {
|
||||
info = this.info;
|
||||
}
|
||||
ActiveMQConnectionRequestInfo amqInfo = (ActiveMQConnectionRequestInfo) info;
|
||||
return new ActiveMQManagedConnection(subject, adapter.makeConnection(amqInfo), amqInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue