Juha,
    Have made the following changes:

1. AbstractVerifier

a)  Added method

    public boolean hasLegalRMIIIOPExceptionTypes(Method method) {

        /*
         * All checked exception classes used in method declarations
         * (other than java.rmi.RemoteException) MUST be conforming
         * RMI/IDL exception types.
         *
         * Spec 28.2.3 (4)
         */
        Iterator it = Arrays.asList(method.getExceptionTypes()).iterator();

        while (it.hasNext()) {
            Class exception = (Class)it.next();

            if (!isRMIIDLExceptionType(exception))
                return false;
        }

        return true;
    }


2. EJB11Verifier

a) Added check for exception types in the loop where you check for methods
as

                if (!hasLegalRMIIIOPExceptionTypes(method)) {

                    fireSpecViolationEvent(entity, method, new
Section("9.2.7.h"));

                    status = false;
                }

3. DefultMessages.properties

a) Added entry

9.2.7.h  =  The exception thrown by methods in the remote interface must be
valid types for RMI/IIOP

The output if I add an exception which is not a valid RMI/IIOP type looks
like

[Verifier]
Bean   : ItemizedCallEntity
Method : public abstract ItemizedCall getItemizedCall() throws
RemoteException,
EJBException
Section: 9.2.7
Warning: The exception thrown by methods in the remote interface must be
valid types for RMI/IIOP

Am not sure where the sections are defined?  Check the spec couldn't find
any specific location and hence just added it as section 9.2.7.h

Please let me know if this look alright.


Regards

Vinay
----- Original Message -----
From: "Juha Lindfors" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 05, 2001 9:06 PM
Subject: Re: [JBoss-dev] Verifier Issue - Shouldn't the RemoteInterface
Class be checked as well?


>
> Hi,
>
> At 14:47 4.6.2001 +0100, you wrote:
> >Well, that is well and fine. What is a bit
> >confusing is  why the Verifier does not check if the RemoteInterface
itself
> >is a valid RMI  type or not? Obviously, the verfyEntityRemote and
> >verifySessionRemote methods  should check if the REMOTE class is a valid
> >RMI type so that it is specified  explicitly an error by the Verifier!
>
> Ok, sure. That's a very good point. Do you have the time to fix that?
> Otherwise it'll have to wait.
>
> -- Juha
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to