1 22 package org.jboss.ejb3.mdb; 23 24 import javax.jms.JMSException ; 25 26 32 public class ProducerConfig 33 { 34 public static void setUsername(Object producer, String user) 35 { 36 ProducerManager manager = ((ProducerObject) producer).getProducerManager(); 37 manager.setUsername(user); 38 } 39 40 public static void setPassword(Object producer, String passwd) 41 { 42 ProducerManager manager = ((ProducerObject) producer).getProducerManager(); 43 manager.setPassword(passwd); 44 } 45 46 47 public static void connect(Object producer) throws JMSException 48 { 49 ProducerManager manager = ((ProducerObject) producer).getProducerManager(); 50 manager.connect(); 51 } 52 53 public static void close(Object producer) throws JMSException 54 { 55 ProducerManager manager = ((ProducerObject) producer).getProducerManager(); 56 manager.close(); 57 } 58 59 60 public static void commit(Object producer) throws JMSException 61 { 62 ProducerManager manager = ((ProducerObject) producer).getProducerManager(); 63 manager.commit(); 64 } 65 66 public static void rollback(Object producer) throws JMSException 67 { 68 ProducerManager manager = ((ProducerObject) producer).getProducerManager(); 69 manager.rollback(); 70 } 71 } 72 | Popular Tags |