@Test public void testSetPriority() throws JMSException { JmsPoolConnection connection = (JmsPoolConnection) cf.createQueueConnection(); Session session = connection.createSession(); Queue queue = session.createTemporaryQueue(); MessageProducer producer = session.createProducer(queue); assertEquals(Message.DEFAULT_PRIORITY, producer.getPriority()); producer.setPriority(1); assertEquals(1, producer.getPriority()); producer.close(); try { producer.setPriority(0); fail("Should throw when producer is closed."); } catch (IllegalStateException ise) {} try { producer.getPriority(); fail("Should throw when producer is closed."); } catch (IllegalStateException ise) {} }
@Override public void setPriority(int priority) throws JMSException { checkClosed(); this.priority = priority; }
JmsPoolMessageProducer implements MessageProducer, AutoCloseable { @Override public void setPriority(int priority) throws JMSException { checkClosed(); this.priority = priority; } }
JmsPoolMessageProducer implements MessageProducer, AutoCloseable { @Override public void setPriority(int priority) throws JMSException { checkClosed(); this.priority = priority; } JmsPoolMessageProducer(JmsPoolSession session, MessageProducer messageProducer, Destination destination, AtomicInteger refCount); }
JmsPoolMessageProducer implements MessageProducer, AutoCloseable { @Override public void setPriority(int priority) throws JMSException { checkClosed(); this.priority = priority; } JmsPoolMessageProducer(JmsPoolSession session, MessageProducer messageProducer, Destination destination, AtomicInteger refCount); @Override void close(); @Override void send(Message message); @Override void send(Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Destination destination, Message message); @Override void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Message message, CompletionListener listener); @Override void send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener listener); @Override void send(Destination destination, Message message, CompletionListener listener); @Override void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener listener); @Override Destination getDestination(); @Override int getDeliveryMode(); @Override void setDeliveryMode(int deliveryMode); @Override boolean getDisableMessageID(); @Override void setDisableMessageID(boolean disableMessageID); @Override boolean getDisableMessageTimestamp(); @Override void setDisableMessageTimestamp(boolean disableMessageTimestamp); @Override int getPriority(); @Override void setPriority(int priority); @Override long getTimeToLive(); @Override void setTimeToLive(long timeToLive); @Override long getDeliveryDelay(); @Override void setDeliveryDelay(long deliveryDelay); @Override String toString(); MessageProducer getMessageProducer(); boolean isAnonymousProducer(); AtomicInteger getRefCount(); MessageProducer getDelegate(); Destination getDelegateDestination(); }
JmsPoolMessageProducer implements MessageProducer, AutoCloseable { @Override public void setPriority(int priority) throws JMSException { checkClosed(); this.priority = priority; } JmsPoolMessageProducer(JmsPoolSession session, MessageProducer messageProducer, Destination destination, AtomicInteger refCount); @Override void close(); @Override void send(Message message); @Override void send(Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Destination destination, Message message); @Override void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Message message, CompletionListener listener); @Override void send(Message message, int deliveryMode, int priority, long timeToLive, CompletionListener listener); @Override void send(Destination destination, Message message, CompletionListener listener); @Override void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive, CompletionListener listener); @Override Destination getDestination(); @Override int getDeliveryMode(); @Override void setDeliveryMode(int deliveryMode); @Override boolean getDisableMessageID(); @Override void setDisableMessageID(boolean disableMessageID); @Override boolean getDisableMessageTimestamp(); @Override void setDisableMessageTimestamp(boolean disableMessageTimestamp); @Override int getPriority(); @Override void setPriority(int priority); @Override long getTimeToLive(); @Override void setTimeToLive(long timeToLive); @Override long getDeliveryDelay(); @Override void setDeliveryDelay(long deliveryDelay); @Override String toString(); MessageProducer getMessageProducer(); boolean isAnonymousProducer(); AtomicInteger getRefCount(); MessageProducer getDelegate(); Destination getDelegateDestination();  }