Bug 1235886 - [GSS](6.4.z) @Resource injection of UserTransaction does not inject serializable proxy
Summary: [GSS](6.4.z) @Resource injection of UserTransaction does not inject serializa...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CDI/Weld
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.12
Assignee: baranowb
QA Contact: Matej Novotny
URL:
Whiteboard:
Depends On:
Blocks: 1238925 eap6412-payload
TreeView+ depends on / blocked
 
Reported: 2015-06-26 01:40 UTC by James Livingston
Modified: 2019-07-11 09:29 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 13:15:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-6437 0 Major Verified [GSS](7.0.z) Ensure that ejbs can passivate correctly 2017-07-19 12:32:24 UTC
Red Hat Issue Tracker JBTM-2449 0 Major Closed SPI class ServerVMClientUserTransaction should be Serializable and Referenceable 2017-07-19 12:32:24 UTC
Red Hat Issue Tracker WFLY-835 0 Critical Resolved @Resource UserTransaction error when file passivation store is selected 2017-07-19 12:32:24 UTC
Red Hat Knowledge Base (Solution) 1503453 0 None None None Never

Description James Livingston 2015-06-26 01:40:33 UTC
@Resource Injecting UserTransaction into CDI beans or EJBs injects the real ServerVMClientUserTransaction which is not serializable, which causes an exception if the EJB is passivated or the CDI bean in session scope and replicated.

A work around is to use @Inject instead, which injects as serializable proxy.

Comment 3 tom.jenkinson 2015-06-30 20:15:07 UTC
I know the Narayana ones are serializable and referenceable: 
JTA: https://github.com/jbosstm/narayana/blob/master/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/UserTransactionImple.java 

JTS: https://github.com/jbosstm/narayana/blob/master/ArjunaJTS/jtax/classes/com/arjuna/ats/internal/jta/transaction/jts/UserTransactionImple.java

The app server integration side of things was done long ago - its possible their implementation is not up to date with applicable specs or there was a reason it was not made serializable.

Mike perhaps you can take a look at https://github.com/jbosstm/jboss-transaction-spi/blob/master/src/main/java/org/jboss/tm/usertx/client/ServerVMClientUserTransaction.java and see what can be done. There are some comments from 2013 on there.

Comment 4 James Livingston 2015-07-01 01:40:18 UTC
Given that it's a singleton, readResolve/writeReplace() could presumably be used to make Serializable work.

Comment 11 Petr Penicka 2017-01-17 13:15:31 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.


Note You need to log in before you can comment on or make changes to this bug.