1 25 26 package org.objectweb.easybeans.container.mdb; 27 28 import java.lang.reflect.Method ; 29 30 import javax.resource.ResourceException ; 31 import javax.resource.spi.endpoint.MessageEndpoint ; 32 import javax.transaction.xa.XAResource ; 33 34 import org.objectweb.easybeans.api.Factory; 35 import org.objectweb.easybeans.api.bean.EasyBeansMDB; 36 37 42 public class MDBMessageEndPoint implements MessageEndpoint { 43 44 47 private EasyBeansMDB easyBeansMDB = null; 48 49 52 private MDBMessageEndPointFactory mdbMessageEndPointFactory = null; 53 54 58 private XAResource xaResource = null; 59 60 66 public MDBMessageEndPoint(final MDBMessageEndPointFactory mdbMessageEndPointFactory, final EasyBeansMDB easyBeansMDB) { 67 this.mdbMessageEndPointFactory = mdbMessageEndPointFactory; 68 this.easyBeansMDB = easyBeansMDB; 69 } 70 71 92 public void beforeDelivery(Method method) throws NoSuchMethodException , ResourceException { 93 throw new UnsupportedOperationException ("Not implemented"); 95 } 96 97 109 public void afterDelivery() throws ResourceException { 110 throw new UnsupportedOperationException ("Not implemented"); 112 } 113 114 119 public void release() { 120 mdbMessageEndPointFactory.releaseEndPoint(this); 121 } 122 123 127 public Factory getEasyBeansFactory() { 128 return mdbMessageEndPointFactory; 129 } 130 131 132 136 public EasyBeansMDB getEasyBeansMDB() { 137 return easyBeansMDB; 138 } 139 140 144 protected XAResource getXaResource() { 145 return xaResource; 146 } 147 148 152 protected void setXaResource(XAResource xaResource) { 153 this.xaResource = xaResource; 154 } 155 } 156 | Popular Tags |