Using jersey, the AbstractResource class expects to have a Session object injected into it. This injection fails, however, in the context of a transaction when that transaction ID does not exist. This is because the SessionFactory class throws a TransactionMissingException error, leaving the AbstractResource in an invalid state (at least as far as Jersey is concerned).
That invalid state is circumvented by simply throwing a ClientErrorException and returning a 410 Gone response. This means that, from the perspective of a REST client, I see the correct behavior, but still the architecture is incorrect.
This ticket should track the refactoring of how sessions are injected into the AbstractResource class so that TransactionMissingExceptions don't cause stacktraces like this: https://gist.github.com/acoburn/86d46e4d4322cfa08160
This was generated while tailing the tomcat logfile and running this command:
curl -i localhost:8080/fcrepo/rest/tx:fake/some-existing-resource