Investigate @Stateless annotation on API classes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
From recent investigations, some of the API classes have the @Stateless annotation (i.e. are EJBs), others do not.
The issue is that with the current way the Engine work, these @Stateless ones with begin and send a transaction to the Engine, which breaks the way onSuccess is supposed to be run in a separate transaction.
So, we either need to remove @Stateless OR modify the engine. The latter is likely the more robust way and @qqmyers had a suggestion:
"what if the outer engine called a submitinNewTransaction on the inner engine (a method that doesn't exist yet) if the command stack is empty and otherwise calls submit. It seems like that might mimic what the intent of the new transaction method on the outer engine"
Once we determine the right path, we should probably make all the API classes consistent, anyway.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the API classes using @Stateless and trace how they begin and submit work to the Engine. Read the outer and inner Engine transaction paths, including the proposed submitInNewTransaction behavior, and compare them with onSuccess expectations. Done means choosing and applying a consistent approach for all API classes, with the transaction behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100