Jump to: navigation, search

EclipseLink/Development/DatabasePlatform/MaxDBPlatform

< EclipseLink‎ | Development
Revision as of 13:00, 22 November 2010 by Adrian.goerler.sap.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This is a subclass of DatabasePlatform that can be used by customers using the SAP MaxDB database.

Documentation

Detailed information on SAP MaxDB, documentation and downloads are found at the following locations:

http://maxdb.sap.com/

http://www.sdn.sap.com/irj/sdn/maxdb

Forward mapping with EclipseLink assumes that MaxDB is configured for unicode (in version 7.7, this is the default). Unicode mode also needs to be specified in the URL as follows:

jdbc:sapdb://localhost/E32?unicode=yes

The MaxDB platform is configured in the persistence.xml by the following property:

<property name="eclipselink.target-database" value="MaxDB"/>


Limitations of the Platform

  • The platform class must not be used with XA transactions - see bug 329773.
  • SetQueryTimeout or the hint "javax.persistence.query.timeout" do not work on MaxDB - see bug 326503.
  • The hint "javax.persistence.lock.timeout" has no effect with a positive value; a value of 0 is translated to NOWAIT.
  • The maximum width of an index is 1024 bytes on MaxDB. This also limits the size of a primary key. Moreover the primary key of join tables must not exceed this limit either. As it is composed of the primary key of the two tables that are joined, the combined width of the PKs of these two tables must not exceed this limit. See bug bug 326968.
  • VARCHAR [UNICODE] columns do not preserve trailing spaces - see bug 327435 .
  • VARCHAR BYTE does not preserve trailing 0 bytes.
  • The hint "javax.persistence.lock.timeout=0" (NOWAIT) has no effect when atempting to pessimistically lock an entity with inheritance type JOINED - see bug 326799 .
  • Pessimistic locking with lock scope EXTENDED should be used cautiously in the presence of foreign key constraints: Locking an entity with lock scope EXTENDED will reliably block concurrent access to join table rows held by the locked entity causing the concurrent transaction to wait. However, in this situation, attempting to access a collection-valued relationship owned by the locked entity can lead to a deadlock causing the transaction that obtained the pessimistic lock to be rolled back. See bug 327472 .
  • The JPQL function sum returns Double values, if applied to attributes of type BigDecimal - see bug 320120 .

Location

The MaxDB platform class org.eclipse.persistence.platform.database.MaxDBPlatform is contained in the main eclipselink.jar file and the org.eclipse.persistence.core bundle.

Level of Testing

October 19th, 2010

  • EclipseLink 2.2.0 (trunk) current build (revision: 8376)
  • DB: MaxDB, kernel 7.9.06 build 003-123-238-501
  • JDBC driver: MaxDB JDBC Driver, SAP AG, 7.6.06 Build 006-000-009-234 (Make-Version: 7.8.01 Build 003-123-215-703)
Test Name Tests Failures Errors
Core SRG 690 0 1 (*)
JPA SRG 203 0 0
JPA WDF 819 0 0
Core LRG 7508 0 2 (*)
JPA LRG 2297 0 0
Server Tests (GlassFish v3) 2057 1 241 (**)
WDF Server Tests (JBoss 5.1) 809 0 0

(*) Reported as MaxDB JDBC Driver Bug

(**) Test run on MySQL (for comparison): 2 failures, 240 errors

Details on Errors/Failures

Core SRG

Test Case: org.eclipse.persistence.testing.tests.SRGTestModel

Test Name Bug Description/Reason
ScrollableCursorNavigationAPIConformingTest bug 326646 cursor.last() does not result in cursor.isLast() returning true. Filed as MaxDB JDBC driver issue 3124858 2010


Core LRG

Test Case: org.eclipse.persistence.testing.tests.TestRunModel

Test Name Bug Description/Reason
ScrollableCursorNavigationAPIConformingTest bug 326646 Same as ScrollableCursorNavigationAPIConformingTest in Core SRG (Filed as MaxDB JDBC driver issue 3124858 2010)
ScrollableCursorNavigationAPIConformingTest bug 326646 Same as ScrollableCursorNavigationAPIConformingTest in Core SRG (Filed as MaxDB JDBC driver issue 3124858 2010)


Server Tests Failing Exclusively on the MaxDB Platform

org.eclipse.persistence.testing.tests.jpa.jpql.JPQLServerTestSuite

Test Name Bug Description/Reason
testBatchFetchingIN5 bug 330449 fromIndex(1) > toIndex(0)

Note that the test fails only occasionally (randomly), such as also testBatchFetchingIN2 that has also been observed on MySQL.

Server Tests Failing on both MaxDB and MySQL

org.eclipse.persistence.testing.tests.jpa.advanced.AdvancedServerTestSuite

Test Name Bug Description/Reason
testCascadeDetach javax.persistence.TransactionRequiredException
testAdditionalCriteriaWithParameterFromEM1 javax.persistence.TransactionRequiredException
testAdditionalCriteriaWithParameterFromEM2 javax.persistence.TransactionRequiredException
testComplexAdditionalCriteria javax.persistence.TransactionRequiredException

org.eclipse.persistence.testing.tests.jpa.cacheable.CacheableServerTestSuite

Test Name Bug Description/Reason
testEMPropertiesOnCommit1 javax.persistence.TransactionRequiredException
testEMPropertiesOnCommit2 javax.persistence.TransactionRequiredException

org.eclipse.persistence.testing.tests.jpa.delimited.DelimitedPUTestSuite

Test Name Bug Description/Reason
testPopulate Referential integrity violated:FK_CMP3_RESPONS_EMP_ID,SAPL36DB,CMP3_RES
testReadEmployee Follow-up error of failing testPopulate
testNativeQuery Follow-up error of failing testPopulate
testUpdateEmployee Follow-up error of failing testPopulate

org.eclipse.persistence.testing.tests.jpa.fetchgroups.FetchGroupsServerTestSuite

Test Name Bug Description/Reason
112 out of 130 tests FetchGroupTracker not implemented by: Employee

org.eclipse.persistence.testing.tests.jpa.fieldaccess.fetchgroups.FAServerTestSuite

Test Name Bug Description/Reason
112 out of 113 tests FetchGroupTracker not implemented by: Employee

org.eclipse.persistence.testing.tests.jpa.jpql.JPQLServerTestSuite

Test Name Bug Description/Reason
testBatchFetchingIN2 fromIndex(2) > toIndex(1)
testExecuteUpdateOnSelect javax.persistence.TransactionRequiredException

org.eclipse.persistence.testing.tests.nativeapitest.NativeAPITests

Test Name Bug Description/Reason
5 out of 5 tests SAXParseException: cvc-elt.4.2: Cannot resolve 'sunas-9-platform' to a type definition for element 'server-platform'.

Location of tests and examples

No specific tests or examples have been written