[jboss-cvs] JBossAS SVN: r108296 - projects/jboss-jca/trunk/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 23 11:20:06 EDT 2010


Author: jesper.pedersen
Date: 2010-09-23 11:20:06 -0400 (Thu, 23 Sep 2010)
New Revision: 108296

Modified:
   projects/jboss-jca/trunk/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnectionFactory.java
Log:
[JBAS-8456] Upport of JBAS-4072

Modified: projects/jboss-jca/trunk/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnectionFactory.java	2010-09-23 15:17:59 UTC (rev 108295)
+++ projects/jboss-jca/trunk/adapters/src/main/java/org/jboss/jca/adapters/jdbc/xa/XAManagedConnectionFactory.java	2010-09-23 15:20:06 UTC (rev 108296)
@@ -282,7 +282,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, (Class[])null);
+                  type = isMethod.getReturnType();
+               }                                                                                                         
+               catch(NoSuchMethodException nsme)                                                                         
+               {
+                  type = String.class;
+               }
             }
 
             Method setter = clazz.getMethod("set" + name, new Class<?>[]{type});
@@ -525,7 +534,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, (Class[])null);
+                     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