BTW as far as a understand, spring generates a pro...
# spring
f
BTW as far as a understand, spring generates a proxy, and catches exceptions coming from methods/classes annotated with
@Transaction
to _commit_/_rollback_ the current transaction. However, I want my service layer to be something like
Either<Error, A>
t
my suggestion would be to write a wrapper around normally annotated
@Transactional
level to catch transaction exception and convert them into the
A
part of your
Either
(you can do
Either<Result, RollbackTransactionException>
- metacode)
spring is a java framework, a lot is done with exception and I don't like it either but you lose lot of power trying to be too smart
g
Yes, I don't like throwing an exception just because it's not in the database, but that's how it works..