Community
Participate
Working Groups
SAP HANA Database supports SELECT FOR UPDATE in principle. However, FOR UPDATE is not supported with queries that select from multiple tables, such as queries that contain a join or a subselect. Some of the pessimistic locking tests operate on a data model that leads to join queries. Those tests are therefore skipped on SAP HANA Database. Affected tests: * foundation: package org.eclipse.persistence.testing.tests.queries - PessimisticLockEmptyTransactionTest - PessimisticLockTest * jpa: package org.eclipse.persistence.testing.tests.jpa.advanced - EntityManagerJUnitTestSuite.testGetLockModeType() I'll attach containing the modified tests.
Created attachment 218205 [details] Patch containing the modified tests
Checked in changes as submitted Reviewed by: Tom Ware - reviewed submitted changes
FEATURE UPDATE: I got the info from SAP HANA development that SELECT FOR UPDATE on JOINs is being developed and will be available with one of the next support packages. As a timeline, I would expect the feature to be available by end of 2012/beginning 2013 (without any guarantee, of course).
Some more tests are affected by the same issue: * jpa: package org.eclipse.persistence.testing.tests.jpa.advanced - EntityManagerJUnitTestSuite.testPESSIMISTIC_FORCE_INCREMENTLock() - EntityManagerJUnitTestSuite.testPESSIMISTIC_READLockWithNoChanges() - EntityManagerJUnitTestSuite.testPESSIMISTIC_WRITELockWithNoChanges() - EntityManagerJUnitTestSuite.testPESSIMISTIC_ExtendedScope() - EntityManagerJUnitTestSuite.testPessimisticLockHintStartsTransaction() - PessimisticLockingExtendedScopeTestSuite.testPESSMISTIC_ES4() - PessimisticLockingExtendedScopeTestSuite.testPESSMISTIC_ES8() - PessimisticLockingExtendedScopeTestSuite.testPESSMISTIC_ES9() package org.eclipse.persistence.testing.tests.jpa.composite.advanced - EntityManagerJUnitTestSuite.testPESSIMISTIC_FORCE_INCREMENTLock() - EntityManagerJUnitTestSuite.testPESSIMISTIC_READLockWithNoChanges() - EntityManagerJUnitTestSuite.testPESSIMISTIC_WRITELockWithNoChanges() - EntityManagerJUnitTestSuite.testLockWithJoinedInheritanceStrategy() - EntityManagerJUnitTestSuite.testGetLockModeType() - EntityManagerJUnitTestSuite.testPessimisticLockHintStartsTransaction() package org.eclipse.persistence.testing.tests.jpa.jpql - AdvancedQueryTestSuite.testQueryPESSIMISTIC_READLock() - AdvancedQueryTestSuite.testQueryPESSIMISTIC_WRITELock() - AdvancedQueryTestSuite.testQueryPESSIMISTIC_FORCE_INCREMENTLock() - AdvancedQueryTestSuite.testLockWithSecondaryTable() - JUnitJPQLComplexTestSuite.testPessimisticLock() I will attach another patch file to skip those tests as well.
Created attachment 221000 [details] Patch containing the second part of the modified tests The patch caused whitespace errors when I tried to apply it. I attach it anyway because I don't know why or how to prevent that.
Additional changes checked in.
Kevin Yuan informed me that the latest patch caused 6 failures in the server tests executed on WebLogic: java.lang.ClassCastException: org.eclipse.persistence.sessions.broker.SessionBroker at org.eclipse.persistence.internal.jpa.EntityManagerImpl.getServerSession(EntityManagerImpl.java:1403) at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.getServerSession(JUnitTestCase.java:457) at org.eclipse.persistence.testing.tests.jpa.composite.advanced.EntityManagerJUnitTestSuite.testGetLockModeType(EntityManagerJUnitTestSuite.java:4822) at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBareServer(JUnitTestCase.java:663) at org.eclipse.persistence.testing.framework.server.TestRunnerBean.runTest(TestRunnerBean.java:87) at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37) at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54) at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy294.runTest(Unknown Source) at org.eclipse.persistence.testing.framework.server.TestRunner_q0mh0s_TestRunnerImpl.__WL_invoke(Unknown Source) at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40) at org.eclipse.persistence.testing.framework.server.TestRunner_q0mh0s_TestRunnerImpl.runTest(Unknown Source) at org.eclipse.persistence.testing.framework.server.TestRunner_q0mh0s_TestRunnerImpl_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:668) at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230) at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:523) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518) at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:119) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) I'll provide a patch for that and have him check it first. If it works I'll attach the patch here.
Created attachment 221452 [details] Patch fixing the exceptions in WebLogic server tests The patch fixes the problems observed in the WebLogic server tests. Kevin Yuan already verified the patch and confirmed that it works.
Checked in additional change.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink