1 22 package org.jboss.ejb3.remoting; 23 24 import org.jboss.aop.Advisor; 25 import org.jboss.aop.InstanceAdvisor; 26 import org.jboss.aop.advice.AspectFactory; 27 import org.jboss.aop.joinpoint.Joinpoint; 28 import org.jboss.aspects.remoting.ReplicantsManagerInterceptor; 29 import org.jboss.ejb3.SessionContainer; 30 31 37 public class ReplicantsManagerInterceptorFactory implements AspectFactory 38 { 39 public Object createPerVM() 40 { 41 throw new RuntimeException ("IMPROPER USAGE"); 42 } 43 44 public Object createPerClass(Advisor advisor) 45 { 46 SessionContainer container = (SessionContainer) advisor; 47 return new ReplicantsManagerInterceptor(container.getClusterFamilies()); 48 } 49 50 public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor) 51 { 52 throw new RuntimeException ("IMPROPER USAGE"); 53 } 54 55 public Object createPerJoinpoint(Advisor advisor, Joinpoint jp) 56 { 57 throw new RuntimeException ("IMPROPER USAGE"); 58 } 59 60 public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp) 61 { 62 throw new RuntimeException ("IMPROPER USAGE"); 63 } 64 65 public String getName() 66 { 67 return this.getClass().getName(); 68 } 69 } 70 | Popular Tags |