From: Bill D. <bde...@jb...> - 2006-01-25 23:42:21
|
User: bdecoste Date: 06/01/25 18:42:15 Modified: src/main/org/jboss/ejb3 Ejb3DescriptorHandler.java Log: 3.0 schema validity Revision Changes Path 1.78 +9 -13 jboss-ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java (In the diff below, changes in quantity of whitespace are not shown.) Index: Ejb3DescriptorHandler.java =================================================================== RCS file: /cvsroot/jboss/jboss-ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java,v retrieving revision 1.77 retrieving revision 1.78 diff -u -b -r1.77 -r1.78 --- Ejb3DescriptorHandler.java 16 Jan 2006 06:04:55 -0000 1.77 +++ Ejb3DescriptorHandler.java 25 Jan 2006 23:42:15 -0000 1.78 @@ -122,7 +122,7 @@ import org.jboss.ejb3.dd.EnterpriseBeans; import org.jboss.ejb3.dd.EnvEntry; import org.jboss.ejb3.dd.ExcludeList; -import org.jboss.ejb3.dd.InitList; +import org.jboss.ejb3.dd.InitMethod; import org.jboss.ejb3.dd.InterceptorBinding; import org.jboss.ejb3.dd.Invoker; import org.jboss.ejb3.dd.InvokerProxyBinding; @@ -644,10 +644,9 @@ { addExcludeAnnotations(container, assembly.getExcludeList(), ejbName); - addInitAnnotations(container, assembly.getInitList(), ejbName); - if (enterpriseBean instanceof SessionEnterpriseBean) { + addInitAnnotations(container, ((SessionEnterpriseBean)enterpriseBean).getInitMethods(), ejbName); addRemoveAnnotations(container, ((SessionEnterpriseBean)enterpriseBean).getRemoveMethods(), ejbName); } @@ -673,23 +672,20 @@ } } - private void addInitAnnotations(EJBContainer container, InitList list, + private void addInitAnnotations(EJBContainer container, List<InitMethod> list, String ejbName) throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException { if (list != null) { - for (Object o : list.getMethods()) - { - Method method = (Method) o; - if (method.getEjbName().equals(ejbName)) + for (InitMethod initMethod : list) { + Method method = initMethod.getBeanMethod(); InitImpl annotation = new InitImpl(); addAnnotations(Init.class, annotation, container, method); } } } - } private void addRemoveAnnotations(EJBContainer container, List<RemoveMethod> list, String ejbName) throws ClassNotFoundException, NoSuchMethodException, |