[jboss-cvs] JBossAS SVN: r110731 - branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/connectionmanager.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 22 09:22:23 EST 2011


Author: jesper.pedersen
Date: 2011-02-22 09:22:23 -0500 (Tue, 22 Feb 2011)
New Revision: 110731

Modified:
   branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java
Log:
[JBPAPP-5292] Guard against null metadata for wrapped resources

Modified: branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java
===================================================================
--- branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java	2011-02-22 14:14:17 UTC (rev 110730)
+++ branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java	2011-02-22 14:22:23 UTC (rev 110731)
@@ -614,21 +614,30 @@
                   if (b != null)
                      isSameRMOverrideValue = b;
 
-                  if(wrapXAResource)
+                  if (wrapXAResource)
                   {
                      String eisProductName = null;
                      String eisProductVersion = null;
 
                      try
                      {
-                        eisProductName = mc.getMetaData().getEISProductName();
-                        eisProductVersion = mc.getMetaData().getEISProductVersion();
+                        if (mc.getMetaData() != null)
+                        {
+                           eisProductName = mc.getMetaData().getEISProductName();
+                           eisProductVersion = mc.getMetaData().getEISProductVersion();
+                        }
                      }
                      catch (ResourceException re)
                      {
                         // Ignore
                      }
 
+                     if (eisProductName == null)
+                        eisProductName = dmd.getJndiName();
+
+                     if (eisProductVersion == null)
+                        eisProductVersion = dmd.getJndiName();
+
                      xaResource = new XAResourceWrapperImpl(xaResource, 
                                                             padXid,
                                                             isSameRMOverrideValue,



More information about the jboss-cvs-commits mailing list