User: patriot1burke
Date: 01/12/11 15:39:37
Modified: src/main/org/jboss/ejb/plugins/jaws/bmp Tag: Branch_2_4
CustomFindByEntitiesCommand.java
Log:
FinderExceptions were not being thrown up stack when customer finder throws
for example, ObjectNotFouncException
Revision Changes Path
No revision
No revision
1.3.4.2 +16 -8
jboss/src/main/org/jboss/ejb/plugins/jaws/bmp/CustomFindByEntitiesCommand.java
Index: CustomFindByEntitiesCommand.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/bmp/CustomFindByEntitiesCommand.java,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -u -r1.3.4.1 -r1.3.4.2
--- CustomFindByEntitiesCommand.java 2001/11/20 09:42:51 1.3.4.1
+++ CustomFindByEntitiesCommand.java 2001/12/11 23:39:37 1.3.4.2
@@ -30,7 +30,7 @@
*
* @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand
* @author <a href="mailto:[EMAIL PROTECTED]">Michel de Groot</a>
- * @version $Revision: 1.3.4.1 $
+ * @version $Revision: 1.3.4.2 $
*/
public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand
{
@@ -82,19 +82,27 @@
coll.add(finderImplMethod.invoke(ctx.getInstance(),args));
result = new FinderResults(coll, null, null, null);
}
- } catch (IllegalAccessException e1)
+ }
+ catch (IllegalAccessException e1)
{
throw new FinderException("Unable to access finder
implementation:"+finderImplMethod.getName());
- } catch (IllegalArgumentException e2)
+ }
+ catch (IllegalArgumentException e2)
{
throw new FinderException("Illegal arguments for finder
implementation:"+finderImplMethod.getName());
- } catch (InvocationTargetException e3)
+ }
+ catch (ExceptionInInitializerError e5)
{
- throw new FinderException("Exception in finder
implementation:"+finderImplMethod.getName());
- } catch (ExceptionInInitializerError e5)
- {
throw new FinderException("Unable to initialize finder
implementation:"+finderImplMethod.getName());
- }
+ }
+ catch (InvocationTargetException e3)
+ {
+ Throwable target = e3.getTargetException();
+ if(target instanceof FinderException) {
+ throw (FinderException)target;
+ }
+ throw new FinderException("Unable to initialize finder implementation: " +
finderImplMethod.getName());
+ }
return result;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development