User: starksm
Date: 02/04/17 10:24:13
Modified: src/main/org/jboss/pool/jdbc/xa Tag: Branch_2_4
XAConnectionFactory.java
Log:
Only perform the XAConnectionImpl specific checks if the source is
a XAConnectionImpl. See Bug#542371
Revision Changes Path
No revision
No revision
1.2.2.4 +6 -8
jbosspool/src/main/org/jboss/pool/jdbc/xa/Attic/XAConnectionFactory.java
Index: XAConnectionFactory.java
===================================================================
RCS file:
/cvsroot/jboss/jbosspool/src/main/org/jboss/pool/jdbc/xa/Attic/XAConnectionFactory.java,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -u -r1.2.2.3 -r1.2.2.4
--- XAConnectionFactory.java 5 Apr 2002 20:07:39 -0000 1.2.2.3
+++ XAConnectionFactory.java 17 Apr 2002 17:24:13 -0000 1.2.2.4
@@ -41,7 +41,7 @@
*
* REVISIONS:
* 20010703 bill added code for transaction isolation
-@version $Revision: 1.2.2.3 $
+@version $Revision: 1.2.2.4 $
*/
public class XAConnectionFactory
extends PoolObjectFactory
@@ -377,16 +377,14 @@
return null;
}
- /**
- * Tells whether a pooled object matches the specified parameters.
- * This is only called if the client requested an object with
- * specific parameters. Usually all objects are "the same" so this
- * is not necessary.
+ /** For XAConnectionImpl check that parameters = String[2]{username, password}
+ and that these match the the source connection user and password. Return
+ true for non-XAConnectionImpl sources
*/
public boolean checkValidObject(Object source, Object parameters)
{
- boolean validObject = false;
- if (parameters != null)
+ boolean validObject = true;
+ if( parameters != null && source instanceof XAConnectionImpl )
{
XAConnectionImpl con = (XAConnectionImpl) source;
String credentials[] = (String[]) parameters;
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development