Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: AW: [eclipselink-dev] running [criteria] server tests on server with JPA 1.0 container

Hi Andreas,

FYI: We have been doing some investigation into how to run JPA 2.0 on JavaEE 5 servers (i.e. servers that use JPA 1.0 by default)

Here is a wiki page with some information about what we have found for WebLogic. We use what we have found here to run JPA 2.0 tests on WebLogic - even though it ships with JPA 1.0 by default.

http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic

We will likely want to do some similar research for other EE 5 servers so we can run JPA 2.0 testing on them. (netweaver for instance)

-Tom

Tom Ware wrote:
Hi Andreas,

No news yet. The last few weeks have been a little slow due to vacations. I believe the next Thursday meeting would be a good place to discuss what the next steps in 2.1 planning are.

-Tom

Fischbach, Andreas wrote:
 Hi Tom,

are there any news regarding test integration for 2.1.0 ?

thanx
-Andreas

-----Ursprüngliche Nachricht-----
Von: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] Im Auftrag von Tom Ware
Gesendet: Montag, 7. Dezember 2009 17:10
An: Dev mailing list for Eclipse Persistence Services
Betreff: Re: AW: [eclipselink-dev] running [criteria] server tests on server with JPA 1.0 container

Hi Adrian,

I have asked that the testing issues be included in the EclipseLink 2.1 planning. Hopefully we can have a discussion about this in planning meeting for 2.1.

-Tom

Goerler, Adrian wrote:
Hi Tom,

the eclipselink.jpa.wdf.tests are basically 1.0 tests. We used to execute them on the NetWeaver Server through a proprietary framework which is not open source. The mechanism for server-testing used for eclipselink.jpa.tests won't work out of the box as the WDF tests don't extend TestCase and we hence can't override the runBare method.

But I'm confident that we'd find some way to execute them on the server.

Before we do so, however, I think we should take care that the eclipselink.jpa.wdf.tests are executed standalone regularly in order to avoid regressions (there are already some). Shaun suggested that we could include them into the JPA-LRG test set, e.g..

Adrian Görler
SAP AG

Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx


-----Ursprüngliche Nachricht-----
Von: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] Im Auftrag von Tom Ware
Gesendet: Montag, 7. Dezember 2009 15:07
An: Dev mailing list for Eclipse Persistence Services
Betreff: Re: [eclipselink-dev] running [criteria] server tests on server with JPA 1.0 container

Hi Adrian,

This is an issue that we need to address. I believe there are two things we need to do to address this.

1. For each supported application server, we need to figure out what configuration options we can use to deploy a JPA 2.0 application, likely an application-managed one. (i.e. Is there a way the application and the server can be configured to avoid things like JPA 1.0 injection so that the JPA annotations and API can be used by users) We then need to make the necessary changes to our test framework to allow those configurations to work. We have already started working looking for configuration options on WebLogic and have had some success. We should start that work for other servers as well.

2. We need a JPA 1.0 regression test framework. Candidates for that test framework are the EclipseLink 1.1.x test framework and possibly the new eclipselink.jpa.wdf.test classes. I am not particularly familiar with the eclipselink.jpa.wdf.test classes. Do you know if they can be configured to do JPA 1.0 testing on the server?

-Tom

Goerler, Adrian wrote:
Hi,
we are attempting to run the JPA server tests on NetWeaver 7.1, which has a JPA 1.0 container. The container sees JPA 1.0 jars and wraps entity managers with a JPA 1.0 interface. Now, the criteria tests are failing as they attempt to invoke the getCriteriaBuilder method, which does not exist in JPA 1.0. There is a check in the CriteriaServerTestSuite.suite method, which should prevent the tests from being executed: *public* *static* Test suite() {
        TestSuite suite = *new* TestSuite();
        suite.setName("Criteria ServerTestSuite");
 >>>>    *if* (! JUnitTestCase./isJPA10/()) {
            suite.addTest(AdvancedCompositePKJunitTest./suite/());
            suite.addTest(AdvancedCriteriaQueryTestSuite./suite/());
            suite.addTest(AdvancedQueryTestSuite./suite/());
            suite.addTest(JUnitCriteriaSimpleTestSuite./suite/());
            suite.addTest(JUnitCriteriaUnitTestSuite./suite/());
suite.addTest(org.eclipse.persistence.testing.tests.jpa.criteria.metamodel.JUnitCriteriaSimpleTestSuite./suite/());
        }               *return* suite;
    }
However, the check is executed on the client side, which sees JPA 2 and hence JUnitTestCase./isJPA10/() returns false on the client. Consequently, the criteria tests are executed and fail on NetWeaver. The situation raises some questions: * How should we deal with the particular case of the criteria queries?

    * Should we alter the JUnitTestCase./isJPA10/()method so that it
      checks on the server side?
    * Should we shift the JUnitTestCase./isJPA10/() method to the 200
      individual tests?

    * How should we deal with 1.0 containers in general?

    * Should we indicate the JPA container version in the
      <server>.properties files and check for it (e.g. in build.xml or
      at runtime)?

    * How can we make visible that tests are not skipped on a server
      with JPA 1.0 container?

-Adrian --- *Adrian Görler
**SAP AG

*Pflichtangaben/Mandatory Disclosure Statements: _http://www.sap.com/company/legal/impressum.epx_

------------------------------------------------------------------------

_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev



Back to the top