Community
Participate
Working Groups
Problem Context Running JEE with WebSphere Liberty profile (8.5) and JTA. Configured persistence.xml to specify WebSphere as target server: <property name="eclipselink.target-server" value="WebSphere_7"/> When running my application, I get the following error: javax.servlet.ServletException: Failed to get: Exception [EclipseLink-23004] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.TransactionException Exception Description: Error obtaining the Transaction Manager Internal Exception: java.lang.ClassNotFoundException: Could not find class 'com.ibm.ws.Transaction.TransactionManagerFactory' as resource 'com/ibm/ws/Transaction/TransactionManagerFactory.class' Problem appears to be the hard-coded value in org.eclipse.persistence.transaction.was.WebSphereTransactionController, which does not match WAS 8.5. Current: TX_MANAGER_FACTORY_CLASS = "com.ibm.ws.Transaction.TransactionManagerFactory"; Should be: TX_MANAGER_FACTORY_CLASS = "com.ibm.tx.jta.TransactionManagerFactory"; Workaround: Create a custom class with proper value and register this in persistence.xml: <property name="eclipselink.target-server" value="foo.bar.MyWebSphereTransactionController"/> Desired solution: Would want to register v 8.5 as target server in persistence.xml, e.g. <property name="eclipselink.target-server" value="WebSphere_8_5"/>
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
WebSphere v8.5.5 introduces a new version of app server run time configuration named WebSphere Liberty profile. The traditional app server still coexists with the liberty profile and named WebSphere full profile. The transaction manager factory used by these profiles are: full - com.ibm.ws.Transaction.TransactionManagerFactory liberty - com.ibm.tx.jta.TransactionManagerFactory We need to keep the full profile using com.ibm.ws.Transaction.TransactionManagerFactory class for all the existing WebSphere* target servers. "WebSphere_7" target server type can be used for v8.* full profile configuration. The desired solution is to add a new "WebSphere_Liberty" target server type to enable the Liberty profile in EclipseLink. AFAIK, one just needs to duplicate or extend existing WebSphere_7 supporting artifacts and change: TX_MANAGER_FACTORY_CLASS = "com.ibm.tx.jta.TransactionManagerFactory"; It would also be nice to have additional "WebSphere_8" target server type, which is just an alias to "WebSphere_7" type. Thank you for all the great support from EclipseLink development team. P.S. May want to change the Severity from normal to enhancement since this is not a bug.
> P.S. May want to change the Severity from normal to enhancement since this > is not a bug. Beg to differ, I consider this to be a defect; EclipseLink claims to support WebSphere Application Server as a target platform, which IMO includes the Liberty profile. Still, since there is a workaround, I wouldn't consider this to be a severe defect. Until this issues is resolved, it would be nice to have the workaround documented somewhere. e.g. on http://www.eclipse.org/eclipselink/documentation/2.4/solutions/websphere002.htm#CEGCHAJB (or the corresponding place in documentation for v 2.5, when finalized).
Created attachment 239160 [details] Adding TransactionManager support for WebSphere Liberty. I created a new platform for WebSphere Liberty so that the TransactionManager can get wired in. This patch adds the new server type 'WebSphere_Liberty'. It was tested on WebSphere Base and WebSphere Liberty. I'll point out that the unwrapConnection(...) method isn't quite correct as Liberty doesn't expose com.ibm.ws.rsadapter.jdbc.WSJdbcUtil that the org.eclipse.persistence.platform.server.was.WebSpherePlatform uses.
Created attachment 239478 [details] Add transaction manager support for WebSphere Liberty v2.
Changes checked into Master Reviewed: Tom Ware reviewed contributed changes Testing: Ran full compile and base testing. Actual WebSpehere Liberty testing will be left for contributer
Patch checked into 2.4.3 and 2.5.2 streams
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink