activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r392556 - /incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
Date Sat, 08 Apr 2006 16:48:16 GMT
Author: chirino
Date: Sat Apr  8 09:48:15 2006
New Revision: 392556

URL: http://svn.apache.org/viewcvs?rev=392556&view=rev
Log:
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)

Modified:
    incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java

Modified: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java?rev=392556&r1=392555&r2=392556&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
(original)
+++ incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
Sat Apr  8 09:48:15 2006
@@ -99,6 +99,9 @@
      */
     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);
         }



Mime
View raw message