[jboss-cvs] JBossAS SVN: r108297 - branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/adapter/jdbc/xa.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 23 11:44:36 EDT 2010


Author: jesper.pedersen
Date: 2010-09-23 11:44:36 -0400 (Thu, 23 Sep 2010)
New Revision: 108297

Modified:
   branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java
Log:
[JBPAPP-5119] Upport JBAS-4072

Modified: branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java
===================================================================
--- branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java	2010-09-23 15:20:06 UTC (rev 108296)
+++ branches/JBPAPP_5_1/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java	2010-09-23 15:44:36 UTC (rev 108297)
@@ -176,7 +176,16 @@
          }
          catch(NoSuchMethodException e)
          {
-            type = String.class;
+            try
+            {
+               //HACK for now until we can rethink the XADataSourceProperties variable and pass type information
+               Method isMethod = clazz.getMethod("is" + name, NOCLASSES);
+               type = isMethod.getReturnType();
+            }
+            catch(NoSuchMethodException nsme)
+            {
+               type = String.class;                     
+            }
          } // end of try-catch
 
          Method setter = clazz.getMethod("set" + name, new Class[]{type});
@@ -566,7 +575,17 @@
                }
                catch (NoSuchMethodException e)
                {
-                  type = String.class;
+                  try
+                  {
+                     //HACK for now until we can rethink the XADataSourceProperties variable and pass type information
+                     Method isMethod = clazz.getMethod("is" + name, NOCLASSES);
+                     type = isMethod.getReturnType();
+                     
+                  }
+                  catch(NoSuchMethodException nsme)
+                  {
+                     type = String.class;                     
+                  }
                }
 
                Method setter = clazz.getMethod("set" + name, new Class[] { type });



More information about the jboss-cvs-commits mailing list