Bugs item #440783, was opened at 2001-07-12 11:26 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=440783&group_id=22866 Category: JBossServer Group: v2.2.2 (stable) Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Verifier rejects RuntimeException Initial Comment: If an EJB business method throws clause includes a RuntimeException, then the Verifier issues a warning: Section: 9.2.7 Warning: The method arguments in the remote interface must be of valid types for RMI/IIOP. There are two problems: 1) the message is misleading and 2) there is nothing wrong with the method. The RuntimeException constraint arises from an overzealous intrepretation of the Java-CORBA mapping spec by the jboss Verifier. The jboss Verifier considers a RuntimeException declared in a business method invalid because it has no CORBA mapping. True enough, but that's because none is needed. As the mapping spec (OMG document ptc/99-03-09) states: "unchecked exception classes are assumed to be mapped to the implicit CORBA system exception, and are therefore not explicitly declared in OMG IDL." The EJB spec allows throwing a RuntimeException from a business method, and in fact encourages it for certain well-defined situations (cf. Sec. 17.2.2, ejb 2.0 spec). The only note on _declaring_ a RuntimeException is the following: "Note that the javax.ejb.EJBException is a subclass of the java.lang.RuntimeException, and therefore it does not have to be listed in the throws clauses of the business methods." There is no firm edict _not_ to declare a RuntimeException in the method. A RuntimeException declaration should be allowed. The work-around is simple--don't declare it--but the Verifier message does not lead one to this conclusion. The relevant code is org.jboss.verifier.strategy.AbstractVerifier.isRMIIDLExceptionType(). This should only be called when validating an Exception parameter or return type, not a throws clause. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=440783&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
