dblevins    2004/10/25 05:55:03

  Modified:    modules/core/src/java/org/openejb/config/rules
                        CheckClasses.java CheckMethods.java
                        Messages.properties
  Log:

  Killed some bad javadoc
  Start of re-enabling openejb.conf/service-jar.xml config support
  
  Revision  Changes    Path
  1.2       +75 -49    
openejb/modules/core/src/java/org/openejb/config/rules/CheckClasses.java
  
  Index: CheckClasses.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/config/rules/CheckClasses.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CheckClasses.java 1 Mar 2004 07:14:43 -0000       1.1
  +++ CheckClasses.java 25 Oct 2004 09:55:03 -0000      1.2
  @@ -44,6 +44,9 @@
    */
   package org.openejb.config.rules;
   
  +import javax.ejb.EJBLocalHome;
  +import javax.ejb.EJBLocalObject;
  +
   import org.openejb.OpenEJBException;
   import org.openejb.config.Bean;
   import org.openejb.config.EjbSet;
  @@ -52,65 +55,81 @@
   import org.openejb.util.SafeToolkit;
   
   
  -
   /**
  -
  -
  + * @author <a href="mailto:[EMAIL PROTECTED]">David Blevins</a>
    */
   
   public class CheckClasses implements ValidationRule {
   
       EjbSet set;
   
  -    public void validate( EjbSet set ) {
  +    public void validate(EjbSet set) {
           this.set = set;
   
           Bean[] beans = set.getBeans();
  -        for ( int i=0; i < beans.length; i++ ) {
  -            Bean b = beans[i];
  -            check_hasEjbClass( b );
  -            check_hasHomeClass( b );
  -            check_hasRemoteClass( b );
  -            check_isEjbClass( b );
  -            check_isHomeInterface( b );
  -            check_isRemoteInterface( b );
  +        Bean b = null;
  +        try {
  +            for (int i = 0; i < beans.length; i++) {
  +                b = beans[i];
  +                check_hasEjbClass(b);
  +                check_isEjbClass(b);
  +                if (b.getHome() != null) {
  +                    check_hasHomeClass(b);
  +                    check_hasRemoteClass(b);
  +                    check_isHomeInterface(b);
  +                    check_isRemoteInterface(b);
  +                }
  +                if (b.getLocalHome() != null) {
  +                    check_hasLocalHomeClass(b);
  +                    check_hasLocalClass(b);
  +                    check_isLocalHomeInterface(b);
  +                    check_isLocalInterface(b);
  +                }
  +            }
  +        } catch (RuntimeException e) {
  +            throw new RuntimeException(b.getEjbName(), e);
           }
   
  -     SafeToolkit.unloadTempCodebase( set.getJarPath() );
  +        SafeToolkit.unloadTempCodebase(set.getJarPath());
       }
   
  +    private void check_hasLocalClass(Bean b) {
  +        lookForClass(b, b.getLocal(), "<local>");
  +    }
   
  -    public void check_hasEjbClass( Bean b ) {
  +    private void check_hasLocalHomeClass(Bean b) {
  +        lookForClass(b, b.getLocalHome(), "<local-home>");
  +    }
  +
  +
  +    public void check_hasEjbClass(Bean b) {
   
           lookForClass(b, b.getEjbClass(), "<ejb-class>");
   
       }
   
   
  -
  -    public void check_hasHomeClass( Bean b ) {
  +    public void check_hasHomeClass(Bean b) {
   
           lookForClass(b, b.getHome(), "<home>");
   
       }
   
   
  -
  -    public void check_hasRemoteClass( Bean b ) {
  +    public void check_hasRemoteClass(Bean b) {
   
           lookForClass(b, b.getRemote(), "<remote>");
   
       }
   
   
  +    public void check_isEjbClass(Bean b) {
   
  -    public void check_isEjbClass( Bean b ) {
  -
  -        if ( b instanceof org.openejb.config.SessionBean ) {
  +        if (b instanceof org.openejb.config.SessionBean) {
   
               compareTypes(b, b.getEjbClass(), javax.ejb.SessionBean.class);
   
  -        } else if (b instanceof org.openejb.config.EntityBean ) {
  +        } else if (b instanceof org.openejb.config.EntityBean) {
   
               compareTypes(b, b.getEjbClass(), javax.ejb.EntityBean.class);
   
  @@ -119,69 +138,76 @@
       }
   
   
  +    private void check_isLocalInterface(Bean b) {
  +        compareTypes(b, b.getLocal(), EJBLocalObject.class);
  +    }
  +
  +    private void check_isLocalHomeInterface(Bean b) {
  +        compareTypes(b, b.getLocalHome(), EJBLocalHome.class);
  +    }
  +
   
  -    public void check_isHomeInterface( Bean b ) {
  +    public void check_isHomeInterface(Bean b) {
   
           compareTypes(b, b.getHome(), javax.ejb.EJBHome.class);
   
       }
   
   
  -
  -    public void check_isRemoteInterface( Bean b ) {
  +    public void check_isRemoteInterface(Bean b) {
   
           compareTypes(b, b.getRemote(), javax.ejb.EJBObject.class);
   
       }
   
   
  -
  -    private void lookForClass(Bean b, String clazz, String type){
  -     try {
  -         SafeToolkit.loadTempClass( clazz, set.getJarPath() );
  -        } catch ( OpenEJBException e ) {
  -            /*
  +    private void lookForClass(Bean b, String clazz, String type) {
  +        try {
  +            SafeToolkit.loadTempClass(clazz, set.getJarPath());
  +        } catch (OpenEJBException e) {
  +/*
               # 0 - Class name
               # 1 - Element (home, ejb-class, remote)
               # 2 - Bean name
               */
   
               ValidationFailure failure = new ValidationFailure("missing.class");
  -            failure.setDetails( clazz, type, b.getEjbName());
  -            failure.setBean( b );
  +            failure.setDetails(clazz, type, b.getEjbName());
  +            failure.setBean(b);
   
  -            set.addFailure( failure );
  +            set.addFailure(failure);
   
  -            //set.addFailure( new ValidationFailure("missing.class", clazz, type, 
b.getEjbName()) );
  -        } catch ( NoClassDefFoundError e){
  -            /*
  +//set.addFailure( new ValidationFailure("missing.class", clazz, type, 
b.getEjbName()) );
  +        } catch (NoClassDefFoundError e) {
  +/*
                # 0 - Class name
                # 1 - Element (home, ejb-class, remote)
                # 2 - Bean name
                # 3 - Misslocated Class name
                */
               ValidationFailure failure = new ValidationFailure("misslocated.class");
  -            failure.setDetails( clazz, type, b.getEjbName(), e.getMessage());
  -            failure.setBean( b );
  +            failure.setDetails(clazz, type, b.getEjbName(), e.getMessage());
  +            failure.setBean(b);
   
  -            set.addFailure( failure );
  +            set.addFailure(failure);
               throw e;
           }
  -        
  +
       }
   
  -    private void compareTypes(Bean b, String clazz1, Class class2 ){
  +    private void compareTypes(Bean b, String clazz1, Class class2) {
           Class class1 = null;
           try {
  -            class1 = SafeToolkit.loadTempClass( clazz1 , set.getJarPath() );
  -        } catch ( OpenEJBException e ) { }
  +            class1 = SafeToolkit.loadTempClass(clazz1, set.getJarPath());
  +        } catch (OpenEJBException e) {
  +        }
   
  -        if ( class1 != null && !class2.isAssignableFrom( class1 ) ) {
  +        if (class1 != null && !class2.isAssignableFrom(class1)) {
               ValidationFailure failure = new ValidationFailure("wrong.class.type");
  -            failure.setDetails( clazz1, class2.getName());
  -            failure.setBean( b );
  +            failure.setDetails(clazz1, class2.getName());
  +            failure.setBean(b);
   
  -            set.addFailure( failure );
  +            set.addFailure(failure);
               //set.addFailure( new ValidationFailure("wrong.class.type", clazz1, 
class2.getName()) );
           }
       }
  
  
  
  1.2       +138 -86   
openejb/modules/core/src/java/org/openejb/config/rules/CheckMethods.java
  
  Index: CheckMethods.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/config/rules/CheckMethods.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CheckMethods.java 1 Mar 2004 07:14:43 -0000       1.1
  +++ CheckMethods.java 25 Oct 2004 09:55:03 -0000      1.2
  @@ -45,96 +45,148 @@
   package org.openejb.config.rules;
   
   import java.lang.reflect.Method;
  +import javax.ejb.EJBLocalObject;
   
   import org.openejb.OpenEJBException;
  -import org.openejb.config.Bean;
  -import org.openejb.config.EjbSet;
  -import org.openejb.config.EntityBean;
  -import org.openejb.config.SessionBean;
  -import org.openejb.config.ValidationFailure;
  -import org.openejb.config.ValidationRule;
  -import org.openejb.config.ValidationWarning;
  +import org.openejb.config.*;
   import org.openejb.util.SafeToolkit;
   
   
  -
   /**
  -
  -
  + * @author <a href="mailto:[EMAIL PROTECTED]">David Blevins</a>
    */
   
   public class CheckMethods implements ValidationRule {
   
   
  -
       EjbSet set;
   
   
  -
  -    public void validate( EjbSet set ) {
  +    public void validate(EjbSet set) {
   
           this.set = set;
   
           Bean[] beans = set.getBeans();
  -        for ( int i=0; i < beans.length; i++ ) {
  +        for (int i = 0; i < beans.length; i++) {
               Bean b = beans[i];
  -            check_remoteInterfaceMethods( b );
  -            check_homeInterfaceMethods( b );
  +            if (b.getHome() != null) {
  +                check_remoteInterfaceMethods(b);
  +                check_homeInterfaceMethods(b);
  +            }
  +            if (b.getLocalHome() != null) {
  +                check_localInterfaceMethods(b);
  +                check_localHomeInterfaceMethods(b);
  +            }
  +        }
  +
  +        SafeToolkit.unloadTempCodebase(set.getJarPath());
  +    }
  +
  +
  +    private void check_localHomeInterfaceMethods(Bean b) {
  +        Class home = null;
  +        Class bean = null;
  +        try {
  +            home = SafeToolkit.loadTempClass(b.getLocalHome(), set.getJarPath());
  +            bean = SafeToolkit.loadTempClass(b.getEjbClass(), set.getJarPath());
  +        } catch (OpenEJBException e) {
  +            return;
  +        }
  +
  +        if (check_hasCreateMethod(b, bean, home)) {
  +            check_createMethodsAreImplemented(b, bean, home);
  +            check_postCreateMethodsAreImplemented(b, bean, home);
           }
   
  -     SafeToolkit.unloadTempCodebase( set.getJarPath() );
  +        check_unusedCreateMethods(b, bean, home);
       }
   
  +    private void check_localInterfaceMethods(Bean b) {
  +        Class intrface = null;
  +        Class beanClass = null;
  +        try {
  +            intrface = SafeToolkit.loadTempClass(b.getLocal(), set.getJarPath());
  +            beanClass = SafeToolkit.loadTempClass(b.getEjbClass(), 
set.getJarPath());
  +        } catch (OpenEJBException e) {
  +            return;
  +        }
  +
  +        Method[] interfaceMethods = intrface.getMethods();
  +        Method[] beanClassMethods = intrface.getMethods();
  +
  +        for (int i = 0; i < interfaceMethods.length; i++) {
  +            if (interfaceMethods[i].getDeclaringClass() == EJBLocalObject.class) 
continue;
  +            try {
  +                String name = interfaceMethods[i].getName();
  +                Class[] params = interfaceMethods[i].getParameterTypes();
  +                Method beanMethod = beanClass.getMethod(name, params);
  +            } catch (NoSuchMethodException nsme) {
  +//  0 - method name
  +//  1 - full method name
  +//  2 - remote|home|local|local-home
  +//  3 - interface name
  +//  4 - EJB Class name
  +                ValidationFailure failure = new 
ValidationFailure("no.busines.method");
  +                failure.setDetails(interfaceMethods[i].getName(), 
interfaceMethods[i].toString(), "local", intrface.getName(), beanClass.getName());
  +                failure.setBean(b);
  +
  +                set.addFailure(failure);
  +
  +//set.addFailure( new ValidationFailure("no.busines.method", 
interfaceMethods[i].toString(), "remote", intrface.getName(), beanClass.getName()));
  +            }
  +        }
  +
  +    }
   
   
  -    private void check_remoteInterfaceMethods( Bean b ){
  +    private void check_remoteInterfaceMethods(Bean b) {
   
  -        Class intrface  = null;
  +        Class intrface = null;
           Class beanClass = null;
           try {
  -            intrface  = SafeToolkit.loadTempClass( b.getRemote() , set.getJarPath() 
);
  -            beanClass = SafeToolkit.loadTempClass( b.getEjbClass() , 
set.getJarPath() );
  -        } catch ( OpenEJBException e ) {
  +            intrface = SafeToolkit.loadTempClass(b.getRemote(), set.getJarPath());
  +            beanClass = SafeToolkit.loadTempClass(b.getEjbClass(), 
set.getJarPath());
  +        } catch (OpenEJBException e) {
               return;
           }
   
           Method[] interfaceMethods = intrface.getMethods();
           Method[] beanClassMethods = intrface.getMethods();
   
  -        for(int i = 0; i < interfaceMethods.length; i++){
  -            if( interfaceMethods[i].getDeclaringClass() == 
javax.ejb.EJBObject.class) continue;
  -            try{
  -                String  name   = interfaceMethods[i].getName();
  +        for (int i = 0; i < interfaceMethods.length; i++) {
  +            if (interfaceMethods[i].getDeclaringClass() == 
javax.ejb.EJBObject.class) continue;
  +            try {
  +                String name = interfaceMethods[i].getName();
                   Class[] params = interfaceMethods[i].getParameterTypes();
  -                Method beanMethod = beanClass.getMethod( name, params );
  -            }catch(NoSuchMethodException nsme){
  -                //  0 - method name
  -                //  1 - full method name
  -                //  2 - remote|home
  -                //  3 - interface name
  -                //  4 - EJB Class name
  +                Method beanMethod = beanClass.getMethod(name, params);
  +            } catch (NoSuchMethodException nsme) {
  +//  0 - method name
  +//  1 - full method name
  +//  2 - remote|home
  +//  3 - interface name
  +//  4 - EJB Class name
                   ValidationFailure failure = new 
ValidationFailure("no.busines.method");
  -                failure.setDetails( 
interfaceMethods[i].getName(),interfaceMethods[i].toString(), "remote", 
intrface.getName(), beanClass.getName());
  -                failure.setBean( b );
  +                failure.setDetails(interfaceMethods[i].getName(), 
interfaceMethods[i].toString(), "remote", intrface.getName(), beanClass.getName());
  +                failure.setBean(b);
   
  -                set.addFailure( failure );
  +                set.addFailure(failure);
   
  -                //set.addFailure( new ValidationFailure("no.busines.method", 
interfaceMethods[i].toString(), "remote", intrface.getName(), beanClass.getName()));
  +//set.addFailure( new ValidationFailure("no.busines.method", 
interfaceMethods[i].toString(), "remote", intrface.getName(), beanClass.getName()));
               }
           }
       }
   
  -    private void check_homeInterfaceMethods( Bean b ){
  -        Class home  = null;
  +    private void check_homeInterfaceMethods(Bean b) {
  +        Class home = null;
           Class bean = null;
           try {
  -            home = SafeToolkit.loadTempClass( b.getHome() , set.getJarPath() );
  -            bean = SafeToolkit.loadTempClass( b.getEjbClass() , set.getJarPath() );
  -        } catch ( OpenEJBException e ) {
  +            home = SafeToolkit.loadTempClass(b.getHome(), set.getJarPath());
  +            bean = SafeToolkit.loadTempClass(b.getEjbClass(), set.getJarPath());
  +        } catch (OpenEJBException e) {
               return;
           }
   
  -        if ( check_hasCreateMethod(b, bean, home) ){
  +        if (check_hasCreateMethod(b, bean, home)) {
               check_createMethodsAreImplemented(b, bean, home);
               check_postCreateMethodsAreImplemented(b, bean, home);
           }
  @@ -149,24 +201,24 @@
        * @param bean
        * @param home
        */
  -    public boolean check_hasCreateMethod(Bean b, Class bean, Class home){
  +    public boolean check_hasCreateMethod(Bean b, Class bean, Class home) {
   
           Method[] homeMethods = home.getMethods();
   
           boolean hasCreateMethod = false;
   
  -        for (int i=0; i < homeMethods.length && !hasCreateMethod; i++){
  +        for (int i = 0; i < homeMethods.length && !hasCreateMethod; i++) {
               hasCreateMethod = homeMethods[i].getName().equals("create");
           }
   
  -        if ( !hasCreateMethod ) {
  +        if (!hasCreateMethod) {
               // 1 - home interface
               // 2 - remote interface
               ValidationFailure failure = new ValidationFailure("no.home.create");
  -            failure.setDetails( b.getHome(), b.getRemote());
  -            failure.setBean( b );
  +            failure.setDetails(b.getHome(), b.getRemote());
  +            failure.setBean(b);
   
  -            set.addFailure( failure );
  +            set.addFailure(failure);
               //set.addFailure( new ValidationFailure("no.home.create", b.getHome(), 
b.getRemote()));
           }
           //-------------------------------------------------------------
  @@ -181,7 +233,7 @@
        * @param home
        * @return
        */
  -    public boolean check_createMethodsAreImplemented(Bean b, Class bean, Class 
home){
  +    public boolean check_createMethodsAreImplemented(Bean b, Class bean, Class 
home) {
           boolean result = true;
   
           Method[] homeMethods = home.getMethods();
  @@ -189,36 +241,36 @@
   
           //-------------------------------------------------------------
           // Create methods must me implemented
  -        for (int i=0; i < homeMethods.length; i++){
  +        for (int i = 0; i < homeMethods.length; i++) {
               if (!homeMethods[i].getName().equals("create")) continue;
               Method create = homeMethods[i];
               Method ejbCreate = null;
  -            try{
  -                ejbCreate = bean.getMethod( "ejbCreate", create.getParameterTypes() 
);
  -            } catch ( NoSuchMethodException e ){
  +            try {
  +                ejbCreate = bean.getMethod("ejbCreate", create.getParameterTypes());
  +            } catch (NoSuchMethodException e) {
                   result = false;
   
  -                String paramString = getParameters( create );
  +                String paramString = getParameters(create);
   
  -                if ( b instanceof EntityBean ) {
  -                    EntityBean entity = (EntityBean)b;
  +                if (b instanceof EntityBean) {
  +                    EntityBean entity = (EntityBean) b;
                       // 1 - EJB Class name
                       // 2 - primary key class
                       // 3 - create params
                       ValidationFailure failure = new 
ValidationFailure("entity.no.ejb.create");
  -                    failure.setDetails( b.getEjbClass(), entity.getPrimaryKey(), 
paramString);
  -                    failure.setBean( b );
  +                    failure.setDetails(b.getEjbClass(), entity.getPrimaryKey(), 
paramString);
  +                    failure.setBean(b);
   
  -                    set.addFailure( failure );
  +                    set.addFailure(failure);
                       //set.addFailure( new ValidationFailure("entity.no.ejb.create", 
b.getEjbClass(), entity.getPrimaryKey(), paramString));
                   } else {
                       // 1 - EJB Class name
                       // 2 - create params
                       ValidationFailure failure = new 
ValidationFailure("session.no.ejb.create");
  -                    failure.setDetails( b.getEjbClass(), paramString);
  -                    failure.setBean( b );
  +                    failure.setDetails(b.getEjbClass(), paramString);
  +                    failure.setBean(b);
   
  -                    set.addFailure( failure );
  +                    set.addFailure(failure);
                       //set.addFailure( new 
ValidationFailure("session.no.ejb.create", b.getEjbClass(), paramString));
                   }
               }
  @@ -236,7 +288,7 @@
        * @param home
        * @return
        */
  -    public boolean check_postCreateMethodsAreImplemented(Bean b, Class bean, Class 
home){
  +    public boolean check_postCreateMethodsAreImplemented(Bean b, Class bean, Class 
home) {
           boolean result = true;
   
           if (b instanceof SessionBean) return true;
  @@ -246,25 +298,25 @@
   
           //-------------------------------------------------------------
           // Create methods must me implemented
  -        for (int i=0; i < homeMethods.length; i++){
  +        for (int i = 0; i < homeMethods.length; i++) {
               if (!homeMethods[i].getName().equals("create")) continue;
               Method create = homeMethods[i];
               Method ejbCreate = null;
  -            try{
  -                ejbCreate = bean.getMethod( "ejbPostCreate", 
create.getParameterTypes() );
  -            } catch ( NoSuchMethodException e ){
  +            try {
  +                ejbCreate = bean.getMethod("ejbPostCreate", 
create.getParameterTypes());
  +            } catch (NoSuchMethodException e) {
                   result = false;
   
  -                String paramString = getParameters( create );
  +                String paramString = getParameters(create);
   
                   // 1 - EJB Class name
                   // 2 - primary key class
                   // 3 - create params
                   ValidationFailure failure = new 
ValidationFailure("no.ejb.post.create");
  -                failure.setDetails( b.getEjbClass(), paramString);
  -                failure.setBean( b );
  +                failure.setDetails(b.getEjbClass(), paramString);
  +                failure.setBean(b);
   
  -                set.addFailure( failure );
  +                set.addFailure(failure);
                   //set.addFailure( new ValidationFailure("no.ejb.post.create", 
b.getEjbClass(), paramString));
               }
           }
  @@ -281,30 +333,30 @@
        * @param home
        * @return
        */
  -    public boolean check_unusedCreateMethods(Bean b, Class bean, Class home){
  +    public boolean check_unusedCreateMethods(Bean b, Class bean, Class home) {
           boolean result = true;
   
           Method[] homeMethods = home.getMethods();
           Method[] beanMethods = bean.getMethods();
   
  -        for (int i=0; i < homeMethods.length; i++){
  +        for (int i = 0; i < homeMethods.length; i++) {
               if (!beanMethods[i].getName().equals("ejbCreate")) continue;
               Method ejbCreate = beanMethods[i];
  -            Method create    = null;
  -            try{
  -                create = home.getMethod( "create", ejbCreate.getParameterTypes() );
  -            } catch ( NoSuchMethodException e ){
  +            Method create = null;
  +            try {
  +                create = home.getMethod("create", ejbCreate.getParameterTypes());
  +            } catch (NoSuchMethodException e) {
                   result = false;
   
  -                String paramString = getParameters( ejbCreate );
  +                String paramString = getParameters(ejbCreate);
                   // 1 - bean class
                   // 2 - create params
                   // 3 - home interface
                   ValidationWarning warning = new 
ValidationWarning("unused.ejb.create");
  -                warning.setDetails( b.getEjbClass(), paramString, home.getName());
  -                warning.setBean( b );
  +                warning.setDetails(b.getEjbClass(), paramString, home.getName());
  +                warning.setBean(b);
   
  -                set.addWarning( warning );
  +                set.addWarning(warning);
                   //set.addWarning( new ValidationWarning("unused.ejb.create", 
b.getEjbClass(), paramString, home.getName()));
               }
           }
  @@ -325,7 +377,7 @@
   ///     beanMethod = beanClass.getMethod(beanMethodName,method.getParameterTypes());
   /// }
   
  -    private String getParameters(Method method){
  +    private String getParameters(Method method) {
           Class[] params = method.getParameterTypes();
           String paramString = "";
   
  @@ -333,8 +385,8 @@
               paramString = params[0].getName();
           }
   
  -        for (int i=1; i < params.length; i++){
  -            paramString += ", "+params[i];
  +        for (int i = 1; i < params.length; i++) {
  +            paramString += ", " + params[i];
           }
   
           return paramString;
  
  
  
  1.3       +118 -118  
openejb/modules/core/src/java/org/openejb/config/rules/Messages.properties
  
  Index: Messages.properties
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/config/rules/Messages.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Messages.properties       10 Mar 2004 09:20:18 -0000      1.2
  +++ Messages.properties       25 Oct 2004 09:55:03 -0000      1.3
  @@ -1,118 +1,118 @@
  -#
  -# Redistribution and use of this software and associated documentation
  -# ("Software"), with or without modification, are permitted provided
  -# that the following conditions are met:
  -#
  -# 1. Redistributions of source code must retain copyright
  -#    statements and notices.  Redistributions must also contain a
  -#    copy of this document.
  -#
  -# 2. Redistributions in binary form must reproduce the
  -#    above copyright notice, this list of conditions and the
  -#    following disclaimer in the documentation and/or other
  -#    materials provided with the distribution.
  -#
  -# 3. The name "OpenEJB" must not be used to endorse or promote
  -#    products derived from this Software without prior written
  -#    permission of The OpenEJB Group.  For written permission,
  -#    please contact [EMAIL PROTECTED]
  -#
  -# 4. Products derived from this Software may not be called "OpenEJB"
  -#    nor may "OpenEJB" appear in their names without prior written
  -#    permission of The OpenEJB Group. OpenEJB is a registered
  -#    trademark of The OpenEJB Group.
  -#
  -# 5. Due credit should be given to the OpenEJB Project
  -#    (http://openejb.sf.net/).
  -#
  -# THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
  -# ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
  -# NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  -# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
  -# THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  -# OF THE POSSIBILITY OF SUCH DAMAGE.
  -#
  -# Copyright 2002 (C) The OpenEJB Group. All Rights Reserved.
  -#
  -# $Id$
  -#
  -#--------------------------------------------------------------------
  -# Validation Rule messages
  -#--------------------------------------------------------------------
  -
  -# 0 - Class name
  -# 1 - Element (home, ejb-class, remote)
  -# 2 - Bean name
  -1.cannot.validate         Cannot validate jar
  -2.cannot.validate         Cannot validate jar
  -3.cannot.validate         {0}
  -
  -# 0 - Class name
  -# 1 - Element (home, ejb-class, remote)
  -# 2 - Bean name
  -1.missing.class           Missing class
  -2.missing.class           Missing class {0} 
  -3.missing.class           The class {0} not found. Check that the class specified 
in the {1} element for bean {2} is spelled correctly and the class is present in the 
jar
  -
  -# 0 - Class name
  -# 1 - EJB Class name
  -1.wrong.class.type        Wrong class type
  -2.wrong.class.type        Wrong class type {0}
  -3.wrong.class.type        The class {0} is the wrong type, it does not extend {1}
  -
  -# 0 - method name
  -# 1 - full method
  -# 2 - remote|home
  -# 3 - interface name
  -# 4 - EJB Class name
  -1.no.busines.method       No such business method
  -2.no.busines.method       Business method {0} not implemented.
  -3.no.busines.method       Business method {1} not implemented. The method was 
declared in the {2} interface {3}, but not implemented in the ejb class {4}
  -
  -# 0 - home interface
  -# 1 - remote interface
  -1.no.home.create          No create method.  
  -2.no.home.create          No create method in {0}.
  -3.no.home.create          The home interface {0} must declare at least one create 
method. Example:\n\n\tpublic {1} create() throws javax.ejb.CreateException, 
java.rmi.RemoteException;
  -
  -# 1 - EJB Class name
  -# 2 - create params
  -1.session.no.ejb.create     Create method not implemented.
  -2.session.no.ejb.create     Create method not implemented: ejbCreate({1}).
  -3.session.no.ejb.create     There should be a create method in the bean class {0} 
with the following signature:\n\n\tpublic void ejbCreate({1}) throws 
javax.ejb.CreateException
  -
  -# 1 - EJB Class name
  -# 2 - primary key class
  -# 3 - create params
  -1.entity.no.ejb.create    Create method not implemented.
  -2.entity.no.ejb.create    Create method not implemented: ejbCreate({2}).
  -3.entity.no.ejb.create    There should be a create method in the bean class {0} 
with the following signature:\n\n\tpublic {1} ejbCreate({2}) throws 
javax.ejb.CreateException
  -
  -# 1 - EJB Class name
  -# 2 - create params
  -1.no.ejb.post.create      No ejbPostCreate method
  -2.no.ejb.post.create      Missing create method: ejbPostCreate({1})
  -3.no.ejb.post.create      Entity create method with no matching ejbPostCreate.  
There should be an ejbPostCreate method in the bean class {0} with the following 
signature:\n\n\tpublic void ejbPostCreate({1}) throws javax.ejb.CreateException
  -
  -# 1 - bean class
  -# 2 - create params
  -# 3 - home interface
  -1.unused.ejb.create       Unused ejbCreate method
  -2.unused.ejb.create       Unused ejbCreate method: ejbCreate({1})
  -3.unused.ejb.create       Create method will never be called.  The bean class {0} 
defines the create method ejbCreate({1}), but there is no matching create({1}) method 
in the home interface {2}
  -                                                                                    
        
  -
  -# 0 - Class name
  -# 1 - Element (home, ejb-class, remote)
  -# 2 - Bean name
  -# 3 - Dependent Class name
  -1.misslocated.class           Misslocated class
  -2.misslocated.class           Misslocated class {0} 
  -3.misslocated.class           The class {0} was found in a parent classloader and 
was loaded from there rather than this jar.  However, a dependent class {3} was not 
found in the parent classloader.  \n\nThere are two ways to fix this:\n\nOne, remove 
the class {0} from the jar in the parent classloader to ensure the class is only 
loaded from this jar.\n\nTwo, move the dependent class {3} and any other dependent 
classes into the jar in the parent classloader.  \n\nMore information can be found at 
http://www.openejb.org/faq_validation.html#misslocated.class
  -
  +#

  +# Redistribution and use of this software and associated documentation

  +# ("Software"), with or without modification, are permitted provided

  +# that the following conditions are met:

  +#

  +# 1. Redistributions of source code must retain copyright

  +#    statements and notices.  Redistributions must also contain a

  +#    copy of this document.

  +#

  +# 2. Redistributions in binary form must reproduce the

  +#    above copyright notice, this list of conditions and the

  +#    following disclaimer in the documentation and/or other

  +#    materials provided with the distribution.

  +#

  +# 3. The name "OpenEJB" must not be used to endorse or promote

  +#    products derived from this Software without prior written

  +#    permission of The OpenEJB Group.  For written permission,

  +#    please contact [EMAIL PROTECTED]

  +#

  +# 4. Products derived from this Software may not be called "OpenEJB"

  +#    nor may "OpenEJB" appear in their names without prior written

  +#    permission of The OpenEJB Group. OpenEJB is a registered

  +#    trademark of The OpenEJB Group.

  +#

  +# 5. Due credit should be given to the OpenEJB Project

  +#    (http://openejb.sf.net/).

  +#

  +# THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS

  +# ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT

  +# NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND

  +# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL

  +# THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,

  +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES

  +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

  +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

  +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,

  +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)

  +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED

  +# OF THE POSSIBILITY OF SUCH DAMAGE.

  +#

  +# Copyright 2002 (C) The OpenEJB Group. All Rights Reserved.

  +#

  +# $Id$

  +#

  +#--------------------------------------------------------------------

  +# Validation Rule messages

  +#--------------------------------------------------------------------

  +

  +# 0 - Class name

  +# 1 - Element (home, ejb-class, remote)

  +# 2 - Bean name

  +1.cannot.validate         Cannot validate jar

  +2.cannot.validate         Cannot validate jar

  +3.cannot.validate         {0}

  +

  +# 0 - Class name

  +# 1 - Element (home, ejb-class, remote)

  +# 2 - Bean name

  +1.missing.class           Missing class

  +2.missing.class           Missing class {0} 

  +3.missing.class           The class {0} not found. Check that the class specified 
in the {1} element for bean {2} is spelled correctly and the class is present in the 
jar

  +

  +# 0 - Class name

  +# 1 - EJB Class name

  +1.wrong.class.type        Wrong class type

  +2.wrong.class.type        Wrong class type {0}

  +3.wrong.class.type        The class {0} is the wrong type, it does not extend {1}

  +

  +# 0 - method name

  +# 1 - full method

  +# 2 - remote|home

  +# 3 - interface name

  +# 4 - EJB Class name

  +1.no.busines.method       No such business method

  +2.no.busines.method       Business method {0} not implemented.

  +3.no.busines.method       Business method {1} not implemented. The method was 
declared in the {2} interface {3}, but not implemented in the ejb class {4}

  +

  +# 0 - home interface

  +# 1 - remote interface

  +1.no.home.create          No create method.  

  +2.no.home.create          No create method in {0}.

  +3.no.home.create          The home interface {0} must declare at least one create 
method. Example:\n\n\tpublic {1} create() throws javax.ejb.CreateException, 
java.rmi.RemoteException;

  +

  +# 1 - EJB Class name

  +# 2 - create params

  +1.session.no.ejb.create     Create method not implemented.

  +2.session.no.ejb.create     Create method not implemented: ejbCreate({1}).

  +3.session.no.ejb.create     There should be a create method in the bean class {0} 
with the following signature:\n\n\tpublic void ejbCreate({1}) throws 
javax.ejb.CreateException

  +

  +# 1 - EJB Class name

  +# 2 - primary key class

  +# 3 - create params

  +1.entity.no.ejb.create    Create method not implemented.

  +2.entity.no.ejb.create    Create method not implemented: ejbCreate({2}).

  +3.entity.no.ejb.create    There should be a create method in the bean class {0} 
with the following signature:\n\n\tpublic {1} ejbCreate({2}) throws 
javax.ejb.CreateException

  +

  +# 1 - EJB Class name

  +# 2 - create params

  +1.no.ejb.post.create      No ejbPostCreate method

  +2.no.ejb.post.create      Missing create method: ejbPostCreate({1})

  +3.no.ejb.post.create      Entity create method with no matching ejbPostCreate.  
There should be an ejbPostCreate method in the bean class {0} with the following 
signature:\n\n\tpublic void ejbPostCreate({1}) throws javax.ejb.CreateException

  +

  +# 1 - bean class

  +# 2 - create params

  +# 3 - home interface

  +1.unused.ejb.create       Unused ejbCreate method

  +2.unused.ejb.create       Unused ejbCreate method: ejbCreate({1})

  +3.unused.ejb.create       Create method will never be called.  The bean class {0} 
defines the create method ejbCreate({1}), but there is no matching create({1}) method 
in the home interface {2}

  +                                                                                    
        

  +

  +# 0 - Class name

  +# 1 - Element (home, ejb-class, remote)

  +# 2 - Bean name

  +# 3 - Dependent Class name

  +1.misslocated.class           Misslocated class

  +2.misslocated.class           Misslocated class {0} 

  +3.misslocated.class           The class {0} was found in a parent classloader and 
was loaded from there rather than this jar.  However, a dependent class {3} was not 
found in the parent classloader.  \n\nThere are two ways to fix this:\n\nOne, remove 
the class {0} from the jar in the parent classloader to ensure the class is only 
loaded from this jar.\n\nTwo, move the dependent class {3} and any other dependent 
classes into the jar in the parent classloader.  \n\nMore information can be found at 
http://www.openejb.org/faq_validation.html#misslocated.class

  +

  
  
  

Reply via email to