Package org.jboss.blacktie.jatmibroker.xatmi

Examples of org.jboss.blacktie.jatmibroker.xatmi.ConnectionException


        log.debug("Received from: " + destination.getQueueName());
        log.debug("getJMSExpiration is " + message.getJMSExpiration());
        org.jboss.blacktie.jatmibroker.core.transport.Message toProcess = convertFromBytesMessage(bytesMessage);
        return toProcess;
      }
      throw new ConnectionException(Connection.TPETIME,
          "Did not receive a message");
    } catch (JMSException t) {
      throw new ConnectionException(Connection.TPESYSTEM,
          "Couldn't receive the message", t);
    }
  }
View Full Code Here


  }

  public void close() throws ConnectionException {
    log.debug("close");
    if (closed) {
      throw new ConnectionException(Connection.TPEPROTO,
          "Sender already closed");
    }
    try {
      log.debug("closing consumer");
      receiver.close();
      log.debug("consumer closed");
      // if (isTemporary) {
      // log.debug("Deleting: " + destination.getQueueName());
      // ((TemporaryQueue) destination).delete();
      // log.debug("Deleted: " + destination.getQueueName());
      // }
      closed = true;
    } catch (Throwable t) {
      log.debug("consumer could not be closed");
      throw new ConnectionException(Connection.TPESYSTEM,
          "Could not delete the queue", t);
    }
  }
View Full Code Here

  public int determineTimeout(long flags) throws ConnectionException {
    return timeout;
  }

  public int getCd() throws ConnectionException {
    throw new ConnectionException(Connection.TPEPROTO,
        "Tried to retrieve the cd on JMS receiver");
  }
View Full Code Here

          .narrow(tmp_ref);
      log.debug("narrowed reference " + clientCallback);
      callbackIOR = orb.object_to_string(clientCallback);
      log.debug("Created:" + callbackIOR);
    } catch (Throwable t) {
      throw new ConnectionException(Connection.TPESYSTEM,
          "Cannot create the receiver", t);
    }
    timeout = Integer.parseInt(properties.getProperty("RequestTimeout"))
        * 1000 + Integer.parseInt(properties.getProperty("TimeToLive"))
        * 1000;
 
View Full Code Here

      } else {
        log.debug("Not waiting for the response, hope its there!");
      }
      if (returnData.isEmpty()
          && (flags & Connection.TPNOBLOCK) == Connection.TPNOBLOCK) {
        throw new ConnectionException(Connection.TPEBLOCK,
            "Did not receive a message");
      } else if (returnData.isEmpty()) {
        log.debug("Empty return data: " + callbackIOR);
        if (JtsTransactionImple.hasTransaction()) {
          try {
            log.debug("Marking rollbackOnly");
            JABTransaction.current().rollback_only();
          } catch (JABException e) {
            throw new ConnectionException(Connection.TPESYSTEM,
                "Could not mark transaction for rollback only");
          }
        }
        throw new ConnectionException(Connection.TPETIME,
            "Did not receive a message");
      } else {
        Message message = returnData.remove(0);
        if (message != null) {
          log.debug("Message was available");
          if (message.rval == EventListener.DISCON_CODE) {
            if (JABTransaction.current() != null) {
              try {
                log.debug("Marking rollbackOnly as disconnection");
                JABTransaction.current().rollback_only();
              } catch (JABException e) {
                throw new ConnectionException(
                    Connection.TPESYSTEM,
                    "Could not mark transaction for rollback only");
              }
            }
          } else if (message.rcode == Connection.TPESVCERR) {
            if (JABTransaction.current() != null) {
              try {
                log.debug("Marking rollbackOnly as svc err");
                JABTransaction.current().rollback_only();
              } catch (JABException e) {
                throw new ConnectionException(
                    Connection.TPESYSTEM,
                    "Could not mark transaction for rollback only");
              }
            }
          } else if (message.rval == Connection.TPFAIL) {
            if (JABTransaction.current() != null) {
              try {
                JABTransaction.current().rollback_only();
              } catch (JABException e) {
                throw new ConnectionException(
                    Connection.TPESYSTEM,
                    "Could not mark transaction for rollback only");
              }
            }
          }
View Full Code Here

  }

  public void close() throws ConnectionException {
    log.debug("close");
    if (closed) {
      throw new ConnectionException(Connection.TPEPROTO,
          "Sender already closed");
    }
    disconnect();
    closed = true;
  }
View Full Code Here

    TransportImpl instance = null;
    try {
      instance = new TransportImpl(orbManagement, jmsManagement,
          properties, this);
    } catch (Throwable t) {
      throw new ConnectionException(
          org.jboss.blacktie.jatmibroker.xatmi.Connection.TPESYSTEM,
          "Could not connect to server", t);
    }
    transports.add(instance);
    log.debug("Creating transport from factory: " + this + " transport: "
View Full Code Here

      org.jboss.blacktie.jatmibroker.core.transport.Message toProcess = JMSReceiverImpl
          .convertFromBytesMessage(bytesMessage);
      log.debug("SERVER onMessage: transaction control ior: "
          + toProcess.control);
      if (JtsTransactionImple.hasTransaction()) {
        throw new ConnectionException(Connection.TPEPROTO,
            "Blacktie MDBs must not be called with a transactional context");
      }
      processMessage(serviceName, toProcess);
      log.debug("Processed message");
    } catch (Throwable t) {
View Full Code Here

    orb.initORB(new String[] {}, null);

    try {
      oa.initOA();
    } catch (Throwable t) {
      throw new ConnectionException(Connection.TPESYSTEM,
          "Could not connect to the orb", t);
    }
    ORBManager.setORB(orb);
    ORBManager.setPOA(oa);
View Full Code Here

        ServiceData data = new ServiceData(properties, serviceName,
            serviceClassName);
        this.serviceData.put(serviceName, data);
        log.info("Advertised: " + serviceName);
      } catch (Throwable t) {
        throw new ConnectionException(Connection.TPESYSTEM,
            "Could not create service factory for: " + serviceName,
            t);
      }
    } else if (!serviceData.getServiceClassName().equals(serviceClassName)) {
      throw new ConnectionException(Connection.TPEMATCH,
          "Service already registered");
    } else {
      log.trace("This is a duplicate advertise");
    }
  }
View Full Code Here

TOP

Related Classes of org.jboss.blacktie.jatmibroker.xatmi.ConnectionException

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.