0 Replies Latest reply on Jun 25, 2019 7:36 AM by valsaraj007

    How to get UserTransaction in WildFly 16

    valsaraj007

      How to get UserTransaction in WildFly 16 client?

      The following seems deprecated:

      EJBClient.getUserTransaction(NODE_NAME);

      Some other code found are:

      RemoteTransactionContext.getInstance().getUserTransaction();

      initContextx.lookup("txn:UserTransaction");

      What is the right way to do this?

       

      When I use programmatic remote EJB call, gets following error after running some operations:

      Caused by: javax.ejb.EJBException: WFTXN0021: Failed to acquire a connection for this operation

      at org.jboss.ejb.protocol.remote.EJBClientChannel.processInvocation(EJBClientChannel.java:471)

      at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.lambda$handleDone$0(RemoteEJBReceiver.java:91)

      at org.xnio.FinishedIoFuture.addNotifier(FinishedIoFuture.java:79)

      at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleDone(RemoteEJBReceiver.java:76)

      at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleDone(RemoteEJBReceiver.java:74)

      at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:208)

      at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720)