Package org.jboss.narayana.blacktie.jatmibroker.xatmi

Examples of org.jboss.narayana.blacktie.jatmibroker.xatmi.Connection


  public JABConnection getConnection(String connectionName)
      throws JABException {
    JABConnection toReturn = connections.get(connectionName);
    if (toReturn == null) {
      try {
        Connection connection = connectionFactory.getConnection();
        toReturn = new JABConnection(connection, session);
        connections.put(connectionName, toReturn);
      } catch (ConfigurationException e) {
        throw new JABException(e.getMessage());
      }
View Full Code Here


  public static void main(String[] args) throws Exception {
    log.info("JavaClient");
    ConnectionFactory connectionFactory = ConnectionFactory
        .getConnectionFactory();
    Connection connection = connectionFactory.getConnection();
    X_OCTET sbuf = (X_OCTET) connection.tpalloc("X_OCTET", null, 29);
    sbuf.setByteArray("THIS IS YOUR CLIENT SPEAKING".getBytes());
    log.info("Calling tpcall with input: %s"
        + new String(sbuf.getByteArray()));
    int cd = connection.tpacall("JAVASERV", sbuf, 0);
    Response retbuf = connection.tpgetrply(cd, 0);
    log.info("Called tpcall with length: %d output: %s"
        + retbuf.getBuffer().getLen() + " "
        + new String(((X_OCTET) retbuf.getBuffer()).getByteArray()));
    connection.close();
  }
View Full Code Here

TOP

Related Classes of org.jboss.narayana.blacktie.jatmibroker.xatmi.Connection

Copyright © 2018 www.massapicom. 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.