1 6 7 package org.jfox.ejb; 8 9 import javax.ejb.MessageDrivenBean ; 10 11 import org.jfox.pool.PoolableObject; 12 13 17 18 public class MDBObjectFactory extends EJBObjectFactory { 19 20 public MDBObjectFactory(Class classType,Bucket bucket) throws Exception { 21 super(classType, bucket); 22 } 23 24 public void destroyObject(PoolableObject object) throws Exception { 26 super.destroyObject(object); 27 if(((StatelessPoolableObject) object).isEjbCreated()) { 29 getBucket().ejbRemove((MessageDrivenBean ) ((MDBPoolableObject) object).getBeanInstance()); 30 } 31 } 32 33 public static void main(String [] args) { 34 35 } 36 } | Popular Tags |