Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/Incubator/Extensions/NetWeaverPlatform"

(Details on Failing Tests)
m
Line 99: Line 99:
 
# Prepare the NetWeaver server for the JPA server tests<br>
 
# Prepare the NetWeaver server for the JPA server tests<br>
 
#* Use the NetWeaver Administrator to deploy the JDBC driver of the database to use for testing. Use the name configured in property '''netweaver.datasource.driver.deployname''' in file '''<user_home>/netweaver.property'''. (TODO: Link to help portal)
 
#* Use the NetWeaver Administrator to deploy the JDBC driver of the database to use for testing. Use the name configured in property '''netweaver.datasource.driver.deployname''' in file '''<user_home>/netweaver.property'''. (TODO: Link to help portal)
# Apply additional patches
+
# Apply patches
 
#* {{bug|287167}} - Server Platform for SAP NetWeaver 7.1   
 
#* {{bug|287167}} - Server Platform for SAP NetWeaver 7.1   
#* {{bug|303472}} - Data source for JPA testing on NetWeaver server should use vendor_sql
+
#* Additional patches depending on the EclipseLink source level (see [[EclipseLink/Development/Incubator/Extensions/NetWeaverPlatform#Location|Additional patches]])
#* Undo changes introduced by {{bug|295124}}, i.e. remove the comments in JarFileArchive.close.
+
 
# Make a full build of eclipselink: Go to the '''<trunk>''' directory, and execute ''''ant''''.
 
# Make a full build of eclipselink: Go to the '''<trunk>''' directory, and execute ''''ant''''.
 
# Execute the tests:
 
# Execute the tests:
Line 108: Line 107:
 
#* Call ''''ant server-test'''' to execute the '''server-test-lrg''' test suite on the application server.<br>
 
#* Call ''''ant server-test'''' to execute the '''server-test-lrg''' test suite on the application server.<br>
 
#* Call ''''ant server-reset'''' to undeploy the test data source and the EclipseLink library.
 
#* Call ''''ant server-reset'''' to undeploy the test data source and the EclipseLink library.
 +
 +
====Additional Patches====
 +
The following patches have been applied depending on the EclipseLink source level:
 +
# '''trunk (2010-02-17)'''
 +
#* {{bug|303472}} - Data source for JPA testing on NetWeaver server should use vendor_sql
 +
#* {{bug|303472}} - Tests testSetRollbackOnly operate on left-over data
 +
#* Undo changes introduced by {{bug|295124}}, i.e. remove the comments in JarFileArchive.close.
  
 
== Location of tests and examples==
 
== Location of tests and examples==
  
 
No specific tests or examples have been written
 
No specific tests or examples have been written

Revision as of 04:23, 22 March 2010

Note: This page describes an extension of EclipseLink that is part of the EclipseLink incubator. Incubator projects are published so the community can use them either to progress towards having them included in the main product, or to use in their own implementations. They have been tested to varying levels and as such, we recommend doing your own testing before including any of this code in a production-level product. Please report any issues via the bug listed below:

Bug

bug 287167

Description

This is a subclass of ServerPlatform that can be used by customers using SAP NetWeaver Application Server Java.

Documentation

Supported Versions

The NetWeaver server platform allows using EclipseLink within SAP NetWeaver Application Server Java. The following versions are supported:

  • SAP NetWeaver 7.1 including EHP 1
  • SAP NetWeaver 7.2
  • SAP NetWeaver 7.3 (not yet publicly available)

Building the NetWeaver Platform

As a prerequisite, you must have checked out the EclipseLink sources from the trunk branch and performed a successful ant-based build. See EclipseLink/Building for detailed instructions. You should then:

  1. Checkout the NetWeaver Platform extension from the location given below.
  2. Edit the build.properties file in the checked out sources so that the property trunk.dir points to the root of the EclipseLink source tree (trunk).
  3. Call 'ant'.

As a result, you should get a file called netweaver_platform.jar, which you can place alongside with the standard eclipselink.jar.

Using the NetWeaver Platform

The recommended deployment option is to create a separate deployable application (i.e. an SDA file) containing both eclipselink.jar and netweaver_platform.jar and to reference that application from your Java EE application. See the NetWeaver Help Portal for a description how to do this using SAP NetWeaver Developer Studio.

In order to use EclipseLink in your application, the persistence.xml file must contain the following entries:

  • Add a <provider> tag to each of the defined persistence units (must be the first line after the <persistence-unit> tag) so that EclipseLink will be used as the JPA provider for the respective persistence unit:
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
  • Include the following property at the end of each persistence unit so that EclipseLink will make use of the NetWeaver platform:
<properties>
  <property name="eclipselink.target-server" value="org.eclipse.persistence.extensions.platform.server.SAPNetWeaver_7_1_Platform"/>   
</properties>

Limitations

  • SAP NetWeaver AS Java (version 7.1 to 7.3) is a Java EE 5 server, hence supporting only JPA 1.0.
  • Dynamic weaving cannot be used inside SAP NetWeaver AS Java. Applications should use static weaving instead.

Location

svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/incubator/extensions/trunk/org.eclipse.persistence.platform.server.netweaver

Level of Testing

Testing of the NetWeaver platform is done using the JPA server test suite.

Test Results Summary

NetWeaver Version EclipseLink Version Database Weaving Tests Failures/Errors Error Details All Issues Addressed?
7.3 dev version
(LKG 2010-02-17 ID 144)
trunk (2.1 stream)
(2010-02-17)
MySQL 5.1.37 a) disabled
b) static
1492 197

AdvancedServerTestSuite (1) [1]
CriteriaServerTestSuite (195) [2]
FAServerTestSuite (1) [3]

yes
7.3 dev version
(LKG 2010-02-17 ID 144)
trunk (2.1 stream)
(2010-02-17)
Oracle 10.2.0.2.0 a) disabled
b) static
1503 208

AdvancedServerTestSuite (1) [1]
CriteriaServerTestSuite (195) [2]
FAServerTestSuite (1) [3]
StructConverterTestSuite (6) [4]
TimeStampTZJUnitTestSuite (5) [5]

yes
(without Oracle specific tests)

Details on Failing Tests

  1. 1.0 1.1 AdvancedServerTestSuite.testSetRollbackOnly: bug 297558
  2. 2.0 2.1 CriteriaServerTestSuite: should not be executed as SAP NetWeaver supports only JPA 1.0, bug 298407
  3. 3.0 3.1 FAServerTestSuite.testSetRollbackOnly: bug 297558
  4. StructConverterTestSuite: Oracle-specific tests, no efforts have been made so far to make them pass
  5. TimeStampTZJUnitTestSuite: Oracle-specific tests, no efforts have been made so far to make them pass

Running the JPA tests on SAP NetWeaver AS Java

  1. Follow the instructions to run the JPA tests against application servers: EclipseLink/Development/Testing/JPA#Running_JPA_tests_against_Application_Servers_Using_Ant
  2. Copy test.properties to the <user_home> directory and edit the properties as described here (step 7.): EclipseLink/Development/Testing/JPA#Configuration
    Additionally, set either one of the following properties to configure weaving:
    • server.weaving=false to disable weaving OR
    • server.weaving=static to use static weaving
  3. Copy netweaver.properties to <user_home> and edit those properties that are marked as user dependent.
  4. Increase the memory parameters for ant's VM using the ANT_OPTS environment variable. Successful test runs could be produced with the following setting:
    • ANT_OPTS=-Xmx512M -XX:MaxPermSize=128M
  5. Prepare the NetWeaver server for the JPA server tests
    • Use the NetWeaver Administrator to deploy the JDBC driver of the database to use for testing. Use the name configured in property netweaver.datasource.driver.deployname in file <user_home>/netweaver.property. (TODO: Link to help portal)
  6. Apply patches
  7. Make a full build of eclipselink: Go to the <trunk> directory, and execute 'ant'.
  8. Execute the tests:
    • Call 'ant server-setup' to deploy the test data source and the EclipseLink library.
    • Call 'ant server-test' to execute the server-test-lrg test suite on the application server.
    • Call 'ant server-reset' to undeploy the test data source and the EclipseLink library.

Additional Patches

The following patches have been applied depending on the EclipseLink source level:

  1. trunk (2010-02-17)
    • bug 303472 - Data source for JPA testing on NetWeaver server should use vendor_sql
    • bug 303472 - Tests testSetRollbackOnly operate on left-over data
    • Undo changes introduced by bug 295124, i.e. remove the comments in JarFileArchive.close.

Location of tests and examples

No specific tests or examples have been written

Back to the top