Hi Folks:
I am kind of confused abt what kind of exceptions can be thrown by container in various case.
I am using CMP,
jboss 3.2.6 and all of my methods set/get for name,status are "Required" attributed. From POJO I am looking up bean ( for which I am using utility class which will convert Naming exception and all checked exceptions that can occur in look up to
EJB Exception). So in POJO I am catching EJBException and converting that to APPLICATION SPECIFIC EXCEPTION(part of our standard),after bean lookup I am calling Finder method so I case of FinderException I am catching it and converting it to App specific exception(part of standard). Once I find the bean calling setters to set the fields and my bean is local to my POJO class. When I am setting bean fields I have various scenarios to handle, 1. If back end database is down what kind of exception container can throw and Is container do Database clean up, is there anyway for me to catch exception that can be thrown by container in this case 2. While looking up for record using Finder method what if data base is down is there any way that I can handle this scenario.
Since my bean is local my bean methods are not throwing RemoteExceptions. I am so concern about these since today morning server was up and running but database was done so when findbyprimarykey in POJO executed container is throwing FinderException with embedded SQLException for network adapter couldn't able to establish connection, so I want to catch it and throw App specific exception saying that Database is down. I want to make it so generic such that whenever database is DOWN at any point of time while executing methods on bean I should be able to say database is down.
Please let me know ASAP, your advice will make me to spin the wheel.
Thanks
alot,
Anu