From jboss-cvs-commits at lists.jboss.org Wed Dec 17 14:26:10 2014 From: jboss-cvs-commits at lists.jboss.org (jboss-cvs-commits at lists.jboss.org) Date: Wed, 17 Dec 2014 14:26:10 -0500 Subject: [jboss-cvs] JBossAS SVN: r114831 - branches. Message-ID: <201412171926.sBHJQAE2021637@svn01.web.mwc.hst.phx2.redhat.com> Author: aogburn Date: 2014-12-17 14:26:10 -0500 (Wed, 17 Dec 2014) New Revision: 114831 Added: branches/JBPAPP_5_2_0_GA-JBPAPP-11209/ Log: [JBPAPP-11209] create one off patch branch From jboss-cvs-commits at lists.jboss.org Wed Dec 17 16:02:26 2014 From: jboss-cvs-commits at lists.jboss.org (jboss-cvs-commits at lists.jboss.org) Date: Wed, 17 Dec 2014 16:02:26 -0500 Subject: [jboss-cvs] JBossAS SVN: r114832 - in branches/JBPAPP_5_2_0_GA-JBPAPP-11209: component-matrix and 6 other directories. Message-ID: <201412172102.sBHL2QOr005975@svn01.web.mwc.hst.phx2.redhat.com> Author: aogburn Date: 2014-12-17 16:02:26 -0500 (Wed, 17 Dec 2014) New Revision: 114832 Modified: branches/JBPAPP_5_2_0_GA-JBPAPP-11209/ branches/JBPAPP_5_2_0_GA-JBPAPP-11209/component-matrix/pom.xml branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnectionFactory.java branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/local/LocalManagedConnectionFactory.java branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java branches/JBPAPP_5_2_0_GA-JBPAPP-11209/main/src/bin/run.sh branches/JBPAPP_5_2_0_GA-JBPAPP-11209/system-jmx/src/main/org/jboss/system/server/jmx/ branches/JBPAPP_5_2_0_GA-JBPAPP-11209/varia/ Log: [JBPAPP-11209] merge fix Property changes on: branches/JBPAPP_5_2_0_GA-JBPAPP-11209 ___________________________________________________________________ Modified: svn:mergeinfo - /branches/JBPAPP_5_1:113810-113813,113815-113838 /tags/JBPAPP_5_2_0_ER5:113818-113819 + /branches/JBPAPP_5:114733-114734 /branches/JBPAPP_5_1:113810-113813,113815-113838 /tags/JBPAPP_5_2_0_ER5:113818-113819 Property changes on: branches/JBPAPP_5_2_0_GA-JBPAPP-11209/component-matrix/pom.xml ___________________________________________________________________ Modified: svn:mergeinfo - /branches/JBPAPP_5_1/component-matrix/pom.xml:113810-113813,113815-113838 /branches/JBPAPP_5_1_2_GA_JBPAPP-7788/component-matrix/pom.xml:112573-112920 /branches/JBPAPP_5_1_2_GA_JDK7/component-matrix/pom.xml:113013,113031 /tags/JBPAPP_5_1_2_GA_JDK7/component-matrix/pom.xml:112847 /tags/JBPAPP_5_2_0_ER5/component-matrix/pom.xml:113818-113819 + /branches/JBPAPP_5/component-matrix/pom.xml:114733-114734 /branches/JBPAPP_5_1/component-matrix/pom.xml:113810-113813,113815-113838 /branches/JBPAPP_5_1_2_GA_JBPAPP-7788/component-matrix/pom.xml:112573-112920 /branches/JBPAPP_5_1_2_GA_JDK7/component-matrix/pom.xml:113013,113031 /tags/JBPAPP_5_1_2_GA_JDK7/component-matrix/pom.xml:112847 /tags/JBPAPP_5_2_0_ER5/component-matrix/pom.xml:113818-113819 Modified: branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java =================================================================== --- branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java 2014-12-17 19:26:10 UTC (rev 114831) +++ branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java 2014-12-17 21:02:26 UTC (rev 114832) @@ -570,7 +570,7 @@ private void checkIdentity(Subject subject, ConnectionRequestInfo cri) throws ResourceException { - Properties newProps = mcf.getConnectionProperties(subject, cri); + Properties newProps = mcf.getConnectionProperties(props, subject, cri); if (!props.equals(newProps)) { throw new JBossResourceException("Wrong credentials passed to getConnection!"); Modified: branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnectionFactory.java =================================================================== --- branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnectionFactory.java 2014-12-17 19:26:10 UTC (rev 114831) +++ branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnectionFactory.java 2014-12-17 21:02:26 UTC (rev 114832) @@ -75,11 +75,6 @@ protected String userName; protected String password; - //This is used by Local wrapper for all properties, and is left - //in this class for ease of writing getConnectionProperties, - //which always holds the user/pw. - protected final Properties connectionProps = new Properties(); - protected int transactionIsolation = -1; protected int preparedStatementCacheSize = 0; @@ -491,14 +486,17 @@ *
In fact, we have a problem here. Theoretically, there is a possible
* name collision between config properties and "user"/"password".
*/
- protected synchronized Properties getConnectionProperties(Subject subject, ConnectionRequestInfo cri)
+ protected synchronized Properties getConnectionProperties(Properties connectionProps, Subject subject, ConnectionRequestInfo cri)
throws ResourceException
{
if (cri != null && cri.getClass() != WrappedConnectionRequestInfo.class)
throw new JBossResourceException("Wrong kind of ConnectionRequestInfo: " + cri.getClass());
Properties props = new Properties();
- props.putAll(connectionProps);
+
+ if (connectionProps != null && connectionProps.size() > 0)
+ props.putAll(connectionProps);
+
if (subject != null)
{
if (SubjectActions.addMatchingProperties(subject, props, this) == true)
Modified: branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/local/LocalManagedConnectionFactory.java
===================================================================
--- branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/local/LocalManagedConnectionFactory.java 2014-12-17 19:26:10 UTC (rev 114831)
+++ branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/local/LocalManagedConnectionFactory.java 2014-12-17 21:02:26 UTC (rev 114832)
@@ -66,6 +66,9 @@
protected String connectionProperties;
+ /** The connection properties */
+ protected final Properties connectionProps = new Properties();
+
public LocalManagedConnectionFactory()
{
@@ -165,10 +168,10 @@
}
}
- public synchronized ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cri)
+ public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cri)
throws javax.resource.ResourceException
{
- Properties props = getConnectionProperties(subject, cri);
+ Properties props = getConnectionProperties(connectionProps, subject, cri);
// Some friendly drivers (Oracle, you guessed right) modify the props you supply.
// Since we use our copy to identify compatibility in matchManagedConnection, we need
// a pristine copy for our own use. So give the friendly driver a copy.
@@ -385,7 +388,7 @@
public ManagedConnection matchManagedConnections(final Set mcs, final Subject subject,
final ConnectionRequestInfo cri) throws ResourceException
{
- Properties newProps = getConnectionProperties(subject, cri);
+ Properties newProps = getConnectionProperties(connectionProps, subject, cri);
for (Iterator i = mcs.iterator(); i.hasNext();)
{
Modified: branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java
===================================================================
--- branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java 2014-12-17 19:26:10 UTC (rev 114831)
+++ branches/JBPAPP_5_2_0_GA-JBPAPP-11209/connector/src/main/org/jboss/resource/adapter/jdbc/xa/XAManagedConnectionFactory.java 2014-12-17 21:02:26 UTC (rev 114832)
@@ -418,7 +418,7 @@
this.isSameRMOverrideValue = isSameRMOverrideValue;
}
- public synchronized ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cri)
+ public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cri)
throws javax.resource.ResourceException
{
if(xadsSelector == null)
@@ -457,7 +457,7 @@
throws javax.resource.ResourceException
{
XAConnection xaConnection = null;
- Properties props = getConnectionProperties(subject, cri);
+ Properties props = getConnectionProperties(null, subject, cri);
try
{
final String user = props.getProperty("user");
@@ -495,7 +495,7 @@
public ManagedConnection matchManagedConnections(Set mcs, Subject subject, ConnectionRequestInfo cri)
throws ResourceException
{
- Properties newProps = getConnectionProperties(subject, cri);
+ Properties newProps = getConnectionProperties(null, subject, cri);
for (Iterator i = mcs.iterator(); i.hasNext();)
{
Object o = i.next();
@@ -519,6 +519,19 @@
}
return null;
}
+
+ /**
+ * Is the properties equal
+ * @param other The other properties
+ * @return True if equal, otherwise false
+ */
+ private boolean isEqual(Map