You'll need: public class MaxNumberOfRequestsException extends Exception rather than extends RuntimeException or whatever you are using to avoid declaring it as being thrown.
RuntimeExceptions and Errors do not need to be handled. Regards, Adrian On Wed, 2004-01-14 at 19:07, Pitre, Russell wrote: > Hello All- > > > > Using: jboss3.2.3-tomcat > > > > I have a class that will throw a user defined exception. > > > > My method: > > public ArrayList getPersistableObjects (String className, String keys) > { > > if(cachelessKeyValues.length() > MAX_NUMBER_OF_REQUESTS) { > > throw new MaxNumberOfRequestsException("Request exceeds maximum number > of requests (" + MAX_NUMBER_OF_REQUESTS + ")"); > > }else{ > > â.do my stuff > > } > > } > > > > I am wrapping this class with an ejb. I want to force my front end > developers to use a try catch statement to catch this exception in > their jspâs. I have the remote interface and the bean class itself > throwing the exception up the lineâ. > > > > BEAN CLASS: > > > > public ArrayList getPersistableObjects(String className, String keys) > throws MaxNumberOfRequestsException{ > > return Mule.getInstance().getPersistableObjects(className, keys); > > } > > INTERFACE: > > > > public ArrayList getPersistableObjects (String className, String keys) > throws MaxNumberOfRequestsException, java.rmi.RemoteException; > > > > > > Everything compiles and works fine except that when the jsp compiles, > it does not force you to catch MaxNumberOfRequestsException > > > > > > Any ideas? Iâve been banging my head all day with thisâ.. > > Russ -- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user