Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14638

[GSS](7.1.z) Prevent enlisting additional resources on EJB caller side in case of server side @RequiresNew

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.1.1.GA
    • EJB, Transactions
    • None
    • +
    • Workaround Exists
    • Hide

      The method of the remote interface can be annotated with @ClientTransaction.

      Show
      The method of the remote interface can be annotated with @ClientTransaction .

    Description

      Scenario:

      • server-1 (intermediary)
        • Running standalone profile
        • Has a remote-outbound-connection pointing at server-2 through server-2's public IP address
        • Intermediary bean need to lookup the Target bean in server-2 and also inject the TransactionManager
        • Intermediary bean need to enlist a dummy XAResource
      • server-2 (target)
        • disable JBOSS-LOCAL-USER auth
        • Target bean needs to be annotated with @REQUIRES_NEW (important)
      • Standalone EJB client invokes an intermediary bean server-1, which as a result invokes target bean on server-2.

      The dummy XAResource should log in the commit method whether one-phase optimization is being used like:

          @Override
          public void commit(Xid arg0, boolean onePhaseOptim) throws XAException {
              logger.info("-- Committing in the client resource. One-phase optimisation is: " + onePhaseOptim + " --"
                      + (onePhaseOptim ? "" : " -> TWO-PHASE COMMIT !!!"));
          }
      

      In this scenario it is expected that the one-phase optimization is being used!

      Attachments

        Issue Links

          Activity

            People

              istudens@redhat.com Ivo Studensky
              rhn-support-jbaesner Joerg Baesner
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: