Hi Kristian, >-----Original Message----- >From: kristian meier [mailto:[EMAIL PROTECTED] >Sent: 18 December 2003 23:56 >To: OJB Users List >Subject: Re: automatic failover > > >Hi Stephen, > > >Stephen Ting wrote: >> Hi, >> >> I think that's make no different than catching >> PersistenceBrokerException because it is the Subclass of >> OJBRuntimeException. >> >for me here is a subtle difference, since OJBRuntimeException is a >subclass of RuntimeException. so if in one component such an exception >is thrown, it will just fall throw your catch clause. > >I dont know the OJB code that well to know whether an >OBJBrokerException can be thrown by the use of the >PersistentBroker, but to be on the safe >side I would catch OJBRuntimeException. in the end I agree that a >PersistentBrokerException should be sufficient according to >the javadocs. > >so I just tried to see if I can reproduce such an exception, but I see >which is wrapped in an application exception and passed >correctly to the >servlet. >
I would be very interested to see the result of your test. In my test, if the database is down. For myself It make no differnet for catching OJBRuntimeException or PersistentBrokerException. Whereas, at the servlet I just didn't get the wrapped execption. It's the RemoteException caught at servlet. >maybe the message I just posted about > >old thread: Re: ConnectionFactoryManagedImpl and rollbacks > >is of any interest for you. > >hope that helps a bit. > >best wishes Kristian > > >> Whereas, for my case where I uses OJB in session bean, it's throw >> RemoteException whenever there is communication link breakdown. The >> PersistenceBrokerExeption catch in session bean was not propagate to >> the web container. Hopefully, this is correct. >> >> Cheers, >> Stephen >> >> >> > > >-- >---------------------------------------------------------------------- > Jentro Technologies GmbH > Kristian Meier, Developer >---------------------------------------------------------------------- > Rosenheimer Str. 145e 81671 Munich, Germany > Tel. +49 89 189 169 80 mailto: [EMAIL PROTECTED] > Fax. +49 89 189 169 99 internet: http://www.jentro.com >---------------------------------------------------------------------- > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
