[
https://issues.jboss.org/browse/WFLY-11629?page=com.atlassian.jira.plugin...
]
Ondra Chaloupka commented on WFLY-11629:
----------------------------------------
after follow-up discussion with [~mkouba] I think the current behaviour should be left as
it is. I would say that if user wants to use the transactions and adding the annotations
in fully programmatic way he is free to add the dependency to the {{org.jboss.jts}} module
manually.
In your reproducer add this to the {{@Deployment}}
(
https://docs.jboss.org/author/display/WFLY/Class+Loading+in+WildFly)
{code}
.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.jts
export services"));
{code}
On top of that in real world application I think it's quite doubtful if there will be
used only programmatic approach with no annotation involved in the code.
Is there some serious objection against closing this one?
Transaction service isn't available when dynamically adding
transactional annotation
------------------------------------------------------------------------------------
Key: WFLY-11629
URL:
https://issues.jboss.org/browse/WFLY-11629
Project: WildFly
Issue Type: Bug
Components: Transactions
Affects Versions: 15.0.1.Final
Reporter: Juan Gonzalez
Assignee: Ondra Chaloupka
Priority: Major
Attachments: wildfly_dynamic_tx_reproducer.zip
When adding dynamically a transactional annotation, transactional module isn't
loaded, so transactions aren't available and throws this error:
{noformat}
javax.persistence.TransactionRequiredException: WFLYJPA0060: Transaction is required to
perform this operation (either use a transaction or extended persistence context)
{noformat}
I've attached a reproducer with a test in order to reproduce this. There you can see
that there is a CDI producer that dynamically adds the annotation for transactions, that
doesn't work.
[~mkouba] found this could be an optimization for not loading JTS module:
https://github.com/wildfly/wildfly/blob/master/transactions/src/main/java...
In order to execute tests:
mvn clean test
To execute test, passing in Payara:
mvn clean test -Ppayara
--
This message was sent by Atlassian Jira
(v7.12.1#712002)