Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333756 - testNonPooledConnection() failed on Spring with "Test problem: connection should be not pooled"
Summary: testNonPooledConnection() failed on Spring with "Test problem: connection sho...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-07 10:30 EST by Yiping Zhao CLA
Modified: 2022-06-09 10:33 EDT (History)
1 user (show)

See Also:


Attachments
test patch (3.44 KB, patch)
2011-01-10 16:35 EST, Andrei Ilitchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yiping Zhao CLA 2011-01-07 10:30:42 EST
Andrei added the test recently on Dec 17, 2010 in revision as for fix of bug 332683, the test failed on Spring with following error message:

Test problem: connection should be not pooled 

junit.framework.AssertionFailedError: Test problem: connection should be not pooled
at org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite.testNonPooledConnection(EntityManagerJUnitTestSuite.java:10032)
at org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:499)
Comment 1 Andrei Ilitchev CLA 2011-01-10 16:35:50 EST
Created attachment 186437 [details]
test patch

It seems that there is no way to pass EntityManager properties to a managed EntityManager in Spring: like app. server JTA case transaction is required to wrapped EntityManagerImpl to appear Spring's EntityManager wrapper; but unlike app. server JTA case, Spring immediately acquires connection on begin transaction therefore passing of connection properties after beginTransaction is too late - connection is already has been acquired.

In Spring case the test uses app. managed entity manager.
Comment 2 Andrei Ilitchev CLA 2011-01-10 16:38:54 EST
Fixed in trunk.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:16:15 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:33:27 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink