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

Reply via email to