Bugs item #850152, was opened at 2003-11-27 09:57 Message generated for change (Comment added) made by wesgere You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=850152&group_id=22866
Category: JBossServer Group: v3.2 Status: Open Resolution: None Priority: 8 Submitted By: Michael Lipp (drmlipp) Assigned to: Nobody/Anonymous (nobody) Summary: ServerException thrown too often Initial Comment: EntityHandleImpl.getEJBObject maps all Exceptions to java.rmi.ServerException. It must not do this as ServerException has a very special meaning (see JDK API doc). As all exceptions are mapped to ServerExceptions, the client cannot know if the RemoteException is temporary (e.g. one node in a cluster failed) or permanent (e.g. the object that is referred to in the handle does not exist anymode). However, an EJB client must be able to obtain this information in order to react appropriately. E.g. the object not being found should be mapped to a java.rmi.noSuchObjectException (this is what we usually get when calling a method an a remote interface that refers to an EJB that does not exist any more). - Michael ---------------------------------------------------------------------- Comment By: Wes Gere (wesgere) Date: 2004-03-23 19:03 Message: Logged In: YES user_id=690357 EntityHandleImpl.getEJBObject just calls the home's findByPrimaryKey method, which is supposed to throw a FinderException if the object doesn't exist anymore, so you should be able to detect this by checking the type of the Exception returned by RemoteException.getCause. The reason EntityHandleImpl.getEJBObject does not specifically detect a "not found" condition may be that it must rely on the bean developer (the home implementation) to detect the condition, and cannot be sure that the home will actually throw a FinderException if this happens. Because of this, there would be a possibility of inconsistent behavior. The current implementation makes it more obvious that any inconsistency here is in the finder implementation. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=850152&group_id=22866 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development