Package org.jboss.narayana.blacktie.jatmibroker.jab

Examples of org.jboss.narayana.blacktie.jatmibroker.jab.JABTransaction.commit()


    JABTransaction transaction = startTx();
    Response response = connection.tpcall("TxEchoService", buffer, 0);
    String responseData = new String(
        ((X_OCTET) response.getBuffer()).getByteArray());
    transaction.commit();
    assertEquals("test=test1,tx=true", responseData);
  }

  public void test2() throws ConnectionException, JABException {
    log.info("TxBlacktieServiceTestCase::test2");
View Full Code Here


    JABTransaction transaction = startTx();
    Response response = connection.tpcall("TxEchoService", buffer, 0);
    String responseData = new String(
        ((X_OCTET) response.getBuffer()).getByteArray());
    transaction.commit();
    assertNotSame("test=test4,tx=false", responseData);
  }

  /*
   * Test that the AS can create a transaction and propagate it too another
View Full Code Here

    jabService.getRequest().setByteArray("X_OCTET", toSend);
    log.info("Calling call with input: " + message);
    jabService.call(null);
    log.info("Called call with output: "
        + new String(jabService.getResponse().getByteArray("X_OCTET")));
    transaction.commit();
    jabSession.closeSession();
  }

  private String prompt(String prompt) throws IOException {
    System.out.println("Please press return after you: " + prompt + "...");
View Full Code Here

    jabService.getRequest().setByteArray("X_OCTET",
        "test_tpcall_x_octet".getBytes());
    log.debug("calling tpcall_x_octet with tx");
    jabService.call(transaction);
    log.debug("called tpcall_x_octet with tx, commiting ...");
    transaction.commit();
    log.debug("tpcall_x_octet commit ok");
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_octet".getBytes(), 0, expected, 0, 14);
    byte[] received = jabService.getResponse().getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
View Full Code Here

    transaction.rollback_only();
    jabService.getRequest().setByteArray("X_OCTET",
        "test_tpcall_x_octet".getBytes());
    jabService.call(transaction);
    try {
      transaction.commit();
      fail("committing a tx marked rollback only succeeded");
    } catch (JABException e) {
      // the exception is expected, but:
      // exception should be CORBA::CORBA::TRANSACTION_ROLLEDBACK but
      // JBossTM
View Full Code Here

        RunServer.getServiceNametpcallXOctet(), jabSession, "X_OCTET",
        null);
    jabService.getRequest().setByteArray("X_OCTET",
        "test_tpcall_x_octet".getBytes());
    jabService.call(transaction);
    transaction.commit();
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_octet".getBytes(), 0, expected, 0, 14);
    byte[] received = jabService.getResponse().getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
View Full Code Here

    balances[1] = 2.2;
    dos.setDoubleArray("balances", balances);

    JABTransaction transaction = new JABTransaction(jabSession, 5000);
    jabService.call(transaction);
    transaction.commit();

    JABMessage response = jabService.getResponse();
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_c_type".getBytes(), 0, expected, 0, 15);
    byte[] received = response.getByteArray("X_OCTET");
View Full Code Here

    jabService.getRequest().setByteArray("X_OCTET",
        "test_tpcall_x_octet".getBytes());
    log.debug("calling tpcall_x_octet with tx");
    jabService.call(transaction);
    log.debug("called tpcall_x_octet with tx, commiting ...");
    transaction.commit();
    log.debug("tpcall_x_octet commit ok");
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_octet".getBytes(), 0, expected, 0, 14);
    byte[] received = jabService.getResponse().getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
View Full Code Here

    transaction.rollback_only();
    jabService.getRequest().setByteArray("X_OCTET",
        "test_tpcall_x_octet".getBytes());
    jabService.call(transaction);
    try {
      transaction.commit();
      fail("committing a tx marked rollback only succeeded");
    } catch (JABException e) {
      // the exception is expected, but:
      // exception should be CORBA::CORBA::TRANSACTION_ROLLEDBACK but
      // JBossTM
View Full Code Here

        RunServer.getServiceNametpcallXOctet(), jabSession, "X_OCTET",
        null);
    jabService.getRequest().setByteArray("X_OCTET",
        "test_tpcall_x_octet".getBytes());
    jabService.call(transaction);
    transaction.commit();
    byte[] expected = new byte[60];
    System.arraycopy("tpcall_x_octet".getBytes(), 0, expected, 0, 14);
    byte[] received = jabService.getResponse().getByteArray("X_OCTET");
    assertTrue(Arrays.equals(expected, received));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.