AW: [OJB-developers] PersistenceBrokerException
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-01-25 14:09:37
|
Hi again Darren, You are totally right. The PersistenceBrokerException way of wrapping = source exception is not very good right now.=20 I'll put it on the todo list ... thanks for your hint, Thomas > -----Urspr=FCngliche Nachricht----- > Von: Darren Syzling [mailto:Dar...@cw...] > Gesendet: Freitag, 25. Januar 2002 14:56 > An: obj...@li... > Betreff: [OJB-developers] PersistenceBrokerException >=20 >=20 > Hi, >=20 > I've just generated a test case in our own code which lead to=20 > a failure in > generating a new sequence id. No problem with this except I=20 > seem to be losing > exception information as the exception is thrown from=20 > ClassDescriptor out > through the PersistenceBroker. >=20 > PersistenceBrokerException seems to store the exception=20 > reason in a field calls > 'msg' along with a reference to the nested exception. =20 > However calling > getMessage on a base class of PersistenceBrokerException does=20 > not return this > error - since it will use the Throwable implementation. Now=20 > this may or may not > be what was intended - this does however cause problems where > PersistenceBrokerExceptions are caught and translated,=20 > especially where we see > code such as: >=20 > catch(Throwable e) > { > throw new MyException(e.getMessage()); > } >=20 > This type of translation actually occurs within the sequence=20 > generation stack: >=20 > ClassDescriptor.getKeyValues() throws PersistenceBrokerException > Identify() catches Throwable and translates to=20 > ClassNotPersistenceCapable using > t.getMessage. >=20 > In this scenario the PersistenceBrokerException which is=20 > thrown out of the > broker.store does not contain the original error details in=20 > the message. >=20 > PersistenceBrokerException also doesn't provide a mechanism=20 > for retrieving the > 'source' exception. Kind of leads me to think it was an=20 > initial implementation > or I'm missing the intent. >=20 >=20 >=20 > Regards > Darren >=20 >=20 >=20 > ************************************************************** > ************************************************************** > ************************** > This e-mail has been prepared using information believed by=20 > the author to be > reliable and accurate, but Thales Information Systems Finance=20 > makes no > warranty as to accuracy or completeness. In particular=20 > Thales Information > Systems Finance does not accept responsibility for =20 > changes made to this > e-mail after it was sent. Any opinions expressed in this=20 > document are those of > the author and do not necessarily reflect the opinions of=20 > the company or its > affiliates. They may be subject to change without notice. > This e-mail, its content and any files transmitted with=20 > it are intended > solely for the addressee(s) and may be legally =20 > privileged and/or > confidential. Access by any other party is unauthorised=20 > without the express > written permission of the sender. If you have received this=20 > e-mail in error you > may not copy or use the contents, attachments or=20 > information in any way. > Please destroy it and contact the sender via the Thales=20 > Information Systems > Finance switchboard in London at +44 (0) 20 7650 0100 or via=20 > e-mail return. > This message and any attachments have been scanned > for viruses prior to leaving the originators network. The=20 > originator does not > guarantee the security of this message and will not be=20 > responsible for any > damages arising from any alteration of this message by a=20 > third party or as a > result of any virus being passed on. > ************************************************************** > ************************************************************** > *************************** >=20 >=20 >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers >=20 |