Thank you all,
The following code actually works:
@Resource(mappedName = "java:comp/TransactionSynchronizationRegistry")
TransactionSynchronizationRegistry transactionSynchronizationRegistry;
Oddly enough, before I had a problem with this, it may be connected with the use of embedded-jboss. I will check tomorrow.