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