Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Easygloss and EJB Transactions  RSS feed

gerret been
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a problem when creating a unittest with easygloss:

My test looks like this:

My serviceBean doesn't have a transaction.
In the method processFile, I have a call to a method with a transaction attribute "requires_new", which is going to change a status in the database.
Than I call another method who search a file in the database with the status that is saved by the previous method.

So the problem with the unittest is that the transaction is only saved at the end of the test(when doing the commit).
But there is no commit done when the method with "requires_new" is finished. So the file is never found

Any idea, how to solve this?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!