this.startTime = System.currentTimeMillis(); this.messageSequence = new AtomicLong(0); this.stats = new JMSProducerStatsImpl(session.getSessionStats(), destination); try { this.session.addProducer(this);
this.startTime = System.currentTimeMillis(); this.messageSequence = new AtomicLong(0); this.stats = new JMSProducerStatsImpl(session.getSessionStats(), destination); try { this.session.addProducer(this);
this.startTime = System.currentTimeMillis(); this.messageSequence = new AtomicLong(0); this.stats = new JMSProducerStatsImpl(session.getSessionStats(), destination); try { this.session.addProducer(this);
this.startTime = System.currentTimeMillis(); this.messageSequence = new AtomicLong(0); this.stats = new JMSProducerStatsImpl(session.getSessionStats(), destination); try { this.session.addProducer(this);
protected ActiveMQMessageProducer(ActiveMQSession session, ProducerId producerId, ActiveMQDestination destination, int sendTimeout) throws JMSException { super(session); this.info = new ProducerInfo(producerId); this.info.setWindowSize(session.connection.getProducerWindowSize()); if (destination != null && destination.getOptions() != null) { Map<String, String> options = new HashMap<String, String>(destination.getOptions()); IntrospectionSupport.setProperties(this.info, options, "producer."); } this.info.setDestination(destination); // Enable producer window flow control if protocol > 3 and the window // size > 0 if (session.connection.getProtocolVersion() >= 3 && this.info.getWindowSize() > 0) { producerWindow = new MemoryUsage("Producer Window: " + producerId); producerWindow.setExecutor(session.getConnectionExecutor()); producerWindow.setLimit(this.info.getWindowSize()); producerWindow.start(); } this.defaultDeliveryMode = Message.DEFAULT_DELIVERY_MODE; this.defaultPriority = Message.DEFAULT_PRIORITY; this.defaultTimeToLive = Message.DEFAULT_TIME_TO_LIVE; this.startTime = System.currentTimeMillis(); this.messageSequence = new AtomicLong(0); this.stats = new JMSProducerStatsImpl(session.getSessionStats(), destination); this.session.addProducer(this); this.session.asyncSendPacket(info); this.setSendTimeout(sendTimeout); setTransformer(session.getTransformer()); }