The following JUnit code fails:
// elided ...
public void testSelectMethod()
{
SQLServerDataSource source = new SQLServerDataSource();
source.setSelectMethod("cursor");
assertEquals("cursor", source.getSelectMethod());
}
// elided ...
with:
junit.framework.ComparisonFailure: Select method not set to cursor
expected:<cursor> but was:<null>
at junit.framework.Assert.assertEquals(Assert.java:81 )
at test.foo.assumptions.JTASQLTest.testSelectMethod(J TASQLTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154 )
at junit.framework.TestCase.runBare(TestCase.java:127 )
at junit.framework.TestResult$1.protect(TestResult.ja va:106)
at junit.framework.TestResult.runProtected(TestResult .java:124)
at junit.framework.TestResult.run(TestResult.java:109 )
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)
jef - integralpath.blogs.com
Yes we changed the name of the SelectMethod property to
forwardReadOnlyMethod.
So you would say:
forwardReadOnlyMethod=direct
or
forwardReadOnlyMethod=serverCursor
Unfortunately we have not yet updated the SQLServerDataSource class to work
with this new setting yet.
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Joe Weinstein" <joeNOSPAM@.bea.com> wrote in message
news:evctk3ozFHA.3312@.TK2MSFTNGP09.phx.gbl...
>
> jef wrote:
>
>
> Check the docs. I believe SelectMethod=cursor is now functionally
> meaningless with this version of the driver, and maybe they allow
> you to make the set call, just so it doesn't break existing code
> that was written for the previous driver, that shares zero code
> with this new one. They might also document that getSelectMethod()
> will do what it does...
> I think the best course is to verify my first contention, and
> then just not call either method for this one...
> Joe Weinstein at BEA
>
|||Note we are planning on changing this back to allowing selectMethod due to
huge customer demand.
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"jef" <jef@.discussions.microsoft.com> wrote in message
news:5FB92280-7932-4722-84AC-72A3102980E5@.microsoft.com...
> The following JUnit code fails:
> // elided ...
> public void testSelectMethod()
> {
> SQLServerDataSource source = new SQLServerDataSource();
> source.setSelectMethod("cursor");
> assertEquals("cursor", source.getSelectMethod());
> }
> // elided ...
> with:
> junit.framework.ComparisonFailure: Select method not set to cursor
> expected:<cursor> but was:<null>
> at junit.framework.Assert.assertEquals(Assert.java:81 )
> at test.foo.assumptions.JTASQLTest.testSelectMethod(J TASQLTest.java:49)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154 )
> at junit.framework.TestCase.runBare(TestCase.java:127 )
> at junit.framework.TestResult$1.protect(TestResult.ja va:106)
> at junit.framework.TestResult.runProtected(TestResult .java:124)
> at junit.framework.TestResult.run(TestResult.java:109 )
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)
>
> --
> jef - integralpath.blogs.com
Sunday, March 11, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment