Package org.objectweb.joram.client.jms

Examples of org.objectweb.joram.client.jms.Destination


    String destType = specImpl.getDestinationType();
    String destName = specImpl.getDestination();

    try {
      Destination dest;
     
      try {
        Context ctx = new InitialContext();
        dest = (Destination) ctx.lookup(destName);
      } catch (javax.naming.NamingException exc) {
        String shortName = removePrefix(destName);
        if ("javax.jms.Queue".equals(destType))
          dest = AdminModule.createQueue(serverId,
                                         shortName,
                                         "org.objectweb.joram.mom.dest.Queue",
                                         null);
        else if ("javax.jms.Topic".equals(destType))
          dest = AdminModule.createTopic(serverId,
                                         shortName,
                                         "org.objectweb.joram.mom.dest.Topic",
                                         null);
        else
          throw new NotSupportedException("Invalid destination type provided as activation parameter: " + destType);
       
        dest.setFreeReading();
        dest.setFreeWriting();

        if (logger.isLoggable(BasicLevel.INFO))
          logger.log(BasicLevel.INFO,
                     "  - Destination [" + shortName + "] has been created.");
View Full Code Here


   * @param name       The JNDI name of the destination.
   */
  public void removeDestination(String name) throws AdminException {
    try {
      Context ctx = new InitialContext();
      Destination dest = (Destination) ctx.lookup(name);
      ctx.close();

      dest.delete();
      unbind(name);
    } catch (Exception exc) {
      logger.log(BasicLevel.WARN,
                 "removeDestination failed: " + name, exc);
      throw new AdminException("removeDestination(" + name + ") failed.");
View Full Code Here

    MsgTransient = getBoolean("MsgTransient", MsgTransient);
    SwapAllowed = getBoolean("SwapAllowed", SwapAllowed);
    transacted = getBoolean("Transacted", transacted);
   
    InitialContext ictx = new InitialContext();
    Destination dest = (Destination) ictx.lookup(args[0]);
    ConnectionFactory cf = (ConnectionFactory) ictx.lookup("cf");
    ictx.close();

    System.out.println("Destination: " + (dest.isQueue()?"Queue":"Topic"));
    System.out.println("Message: MsgTransient=" + MsgTransient);
    System.out.println("Message: SwapAllowed=" + SwapAllowed);
    System.out.println("Transacted=" + transacted);
    System.out.println("NbMsg=" + (Round*NbMsgPerRound) + ", MsgSize=" + MsgSize);

View Full Code Here

    implicitAck = getBoolean("implicitAck", implicitAck);

    NbMsgPerRound = Integer.getInteger("NbMsgPerRound", NbMsgPerRound).intValue();

    InitialContext ictx = new InitialContext();
    Destination dest = (Destination) ictx.lookup(args[0]);
    ConnectionFactory cf = (ConnectionFactory) ictx.lookup("cf");
    ictx.close();

    System.out.println("Destination: " + (dest.isQueue()?"Queue":"Topic"));
    System.out.println("Subscriber: durable=" + durable + ", dupsOk=" + dupsOk);
    System.out.println("            queueMessageReadMax=" + queueMessageReadMax +
                       ", topicAckBufferMax=" + topicAckBufferMax);
    System.out.println("Transacted=" + transacted);
    System.out.println("Subscriber:       implicitAck=" + implicitAck);
View Full Code Here

TOP

Related Classes of org.objectweb.joram.client.jms.Destination

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.