[jboss-cvs] JBossAS SVN: r111182 - in branches/JBPAPP_5_1/testsuite/src: resources/jca/xads and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Apr 15 03:49:33 EDT 2011
Author: jcosta at redhat.com
Date: 2011-04-15 03:49:33 -0400 (Fri, 15 Apr 2011)
New Revision: 111182
Modified:
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jca/xads/TestXADataSource.java
branches/JBPAPP_5_1/testsuite/src/resources/jca/xads/test-xa-ds.xml
Log:
JBAS-4072 JBPAPP-5815 - Added a new property to the TestXADataSource/test-xa-ds.xml with a boolean getter starting with 'is' instead of 'get'.
Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jca/xads/TestXADataSource.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jca/xads/TestXADataSource.java 2011-04-14 13:57:10 UTC (rev 111181)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/jca/xads/TestXADataSource.java 2011-04-15 07:49:33 UTC (rev 111182)
@@ -35,21 +35,38 @@
*/
public class TestXADataSource implements XADataSource
{
- public void setSomeProperty(String someProperty)
- {
- if (someProperty == null)
- throw new NullPointerException("someProperty is null");
- if (someProperty.equals("${org.jboss.test.jca.xads.SomeProperty2}") == false)
- throw new IllegalArgumentException("Wrong value: " + someProperty);
- }
- public void setBackSlash(String backslash)
- {
- if (backslash == null)
- throw new NullPointerException("backslash is null");
- if (backslash.equals("\\") == false)
- throw new IllegalArgumentException("Wrong value: " + backslash);
- }
-
+ private boolean flag;
+
+ public void setSomeProperty(String someProperty)
+ {
+ if (someProperty == null)
+ throw new NullPointerException("someProperty is null");
+ if (someProperty.equals("${org.jboss.test.jca.xads.SomeProperty2}") == false)
+ throw new IllegalArgumentException("Wrong value: " + someProperty);
+ }
+ public void setBackSlash(String backslash)
+ {
+ if (backslash == null)
+ throw new NullPointerException("backslash is null");
+ if (backslash.equals("\\") == false)
+ throw new IllegalArgumentException("Wrong value: " + backslash);
+ }
+
+ // http://community.jboss.org/message/228733#228733
+ // https://issues.jboss.org/browse/JBAS-4072
+ // https://issues.jboss.org/browse/JBPAPP-5815
+ public void setFlag(boolean flag)
+ {
+ if (!flag)
+ throw new IllegalArgumentException("Wrong value: " + flag);
+ this.flag = flag;
+ }
+
+ public boolean isFlag()
+ {
+ return flag;
+ }
+
public int getLoginTimeout() throws SQLException
{
return 0;
@@ -60,7 +77,7 @@
}
public XAConnection getXAConnection() throws SQLException
{
- throw new SQLException("expected");
+ throw new SQLException("expected");
}
public XAConnection getXAConnection(String user, String password) throws SQLException
{
Modified: branches/JBPAPP_5_1/testsuite/src/resources/jca/xads/test-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/resources/jca/xads/test-xa-ds.xml 2011-04-14 13:57:10 UTC (rev 111181)
+++ branches/JBPAPP_5_1/testsuite/src/resources/jca/xads/test-xa-ds.xml 2011-04-15 07:49:33 UTC (rev 111182)
@@ -11,5 +11,6 @@
<xa-datasource-class>org.jboss.test.jca.xads.TestXADataSource</xa-datasource-class>
<xa-datasource-property name="SomeProperty">${org.jboss.test.jca.xads.SomeProperty}</xa-datasource-property>
<xa-datasource-property name="BackSlash">${org.jboss.test.jca.xads.BackSlash}</xa-datasource-property>
+ <xa-datasource-property name="Flag">true</xa-datasource-property>
</xa-datasource>
</datasources>
More information about the jboss-cvs-commits
mailing list