Is it possible to use the Infinispan 2nd level cache outside of a J2EE server, and if so how do I set up the transaction manager lookup?
I implemented the application following the instructions point 1-3, (see code below) using Enhydra StandardXADataSource implementation (better known under the name XAPool). To point 4 I must say that I use “org.hibernate.transaction.JTATransactionFactory” instead to “org.hibernate.transaction.CMTTransactionFactory” because I won’t use any container. Anyway by doing the implementation there are 2 further important aspects to be considered: 1.- the datasource must be JTA – aware. This means that someone must enlist the XAResource into the JTA transaction. This is usually done by the app. server, but we won’t have any in our scenario.