// Uses the simplified API. // Configure sender with method chaining. // Sender is not bound to destination here. JMSProducer sender = context.createProducer (). setDeliveryMode (PERSISTENT). setDeliveryDelay (1000). setTimeToLive (10000); JMSConsumer recipient = context.createConsumer (oQueue);