Hi,
We have some client code which is calling some objects which we have decided to deploy into a container. So we impelemnted the EJB using LocalStatelessSessionProxyFactoryBean, used SimpleRemoteStatelessSessionProxyFactoryBean to access it, and all is well.
However, some of our business methods throw unchecked exceptions. This is causing issues, as the EJB spec states that these are to be classified as SystemExceptions, and require that the bean be discarded. We would like to avoid this for obvious reasons.
However, we're unsure that we want to convert the exceptions to checked exceptions. Which brings us to my question.
What is the inherent wisdom (either negative or positive) of casting our RuntimeExceptions to CheckedExceptions in the EJB class (either in the wrapper methods, or via proxy), and then placing an AOP aspect on the client side EJB proxy to wrap our temporary checked exception back into the original RuntimeException? Has anybody been this creative before?
We my look at our checked vs. unchecked assumptions first, to see if our concern is moot. But it would be nice to know what path others have taken.
Thanks,
-Dave


Reply With Quote