1 22 package org.jboss.ejb3.mdb; 23 24 import java.io.Serializable ; 25 import java.lang.annotation.Annotation ; 26 import org.jboss.annotation.ejb.Producer; 27 28 33 public class ProducerImpl implements Producer, Serializable 34 { 35 private String connectionFactory = ""; 36 private boolean transacted = false; 37 private int acknowledgeMode = 1; 38 private Class producer = null; 39 40 public ProducerImpl(Class producer) 41 { 42 this.producer = producer; 43 } 44 45 public ProducerImpl(String connectionFactory, boolean transacted, int acknowledgeMode) 46 { 47 this.connectionFactory = connectionFactory; 48 this.transacted = transacted; 49 this.acknowledgeMode = acknowledgeMode; 50 } 51 52 public ProducerImpl(Producer producer) 53 { 54 connectionFactory = producer.connectionFactory(); 55 transacted = producer.transacted(); 56 acknowledgeMode = producer.acknowledgeMode(); 57 } 58 59 public Class producer() 60 { 61 return producer; 62 } 63 64 public String connectionFactory() 65 { 66 return connectionFactory; 67 } 68 69 public void setConnectionFactory(String connectionFactory) 70 { 71 this.connectionFactory = connectionFactory; 72 } 73 74 public boolean transacted() 75 { 76 return transacted; 77 } 78 79 public int acknowledgeMode() 80 { 81 return acknowledgeMode; 82 } 83 84 public Class annotationType() 85 { 86 return Producer.class; 87 } 88 } 89 | Popular Tags |