JBoss-as-7.1.1.FINAL infinispan FULL_XA transaction issue.
gesha7 Oct 24, 2013 8:51 AMHi!
I am using JBoss-as 7.1.1 Final on an Ubuntu 12.4
I'm using the preconfigured default cluster cache with added <transaction mode='FULL_XA'/>
So the configuration fragment looks as this:
<cache-container name="cluster" aliases="ha-partition" default-cache="default">
<transport lock-timeout="60000"/>
<replicated-cache name="default" mode="SYNC" batching="true">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="FULL_XA"/>
</replicated-cache>
</cache-container>
Then when I try to put something in the cache within a transaction context the following exception is thrown:
15:15:15,369 ERROR [org.infinispan.transaction.xa.XaTransactionTable] (http--192.168.95.130-8080-1) Failed to enlist TransactionXaAdapter to transaction: java.lang.UnsupportedOperationException (see full trace in the attachment)
My code dealing with the cache follows:
@WebServlet(name = "QueueSenderServlet2", displayName = "Queue Sender Servlet2", urlPatterns = {"/qs2"}, loadOnStartup = 1)
public class Servlet2 extends HttpServlet {
PrintWriter out;
@Resource(lookup="java:jboss/infinispan/container/cluster")
private EmbeddedCacheManager ecm;
Cache cache;
@Resource
private UserTransaction ut;
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
out = response.getWriter();
out.println("<br>====================================");
cache = ecm.getCache();
ut.begin();
cache.put(request.getParameter("name"), request.getParameter("value")); // ------> here the exception is thrown
if (request.getParameter("rb") != null) {
ut.rollback();
out.println("<br> Servlet Transaction rolled back...");
} else {
ut.commit();
out.println("<br> Servlet Transaction about to commit...");
}
out.println("<br>====================================");
} catch (Exception e) {
e.printStackTrace();
} finally {
}
}
}
When I create the EmbeddedCacheManager manually (i.e. with the native classes supplied by infinispan (ConfugurationBuilder, GlobalConfigurationBuilder))
and specify the transaction attributes accordingly - there is no problem. The transaction commits successfully.
So are you aware of any known clues for that problem?
Oracle java 1.7.0_40 64 bit on an Ubuntu 12 machine.
(The same happens on windows 7 64-bit machine)
Best Regards
George
-
ExceptionTrace.txt.zip 2.1 KB