[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: user57 Date: 02/02/16 02:37:55 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: o Moved FinderResults to org.jboss.ejb o Updated all users of that class Revision ChangesPath 1.12 +2 -2 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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CustomFindByEntitiesCommand.java 5 Jan 2002 12:08:51 - 1.11 +++ CustomFindByEntitiesCommand.java 16 Feb 2002 10:37:55 - 1.12 @@ -19,7 +19,7 @@ import org.jboss.logging.Logger; import org.jboss.ejb.plugins.jaws.JPMFindEntitiesCommand; -import org.jboss.util.FinderResults; +import org.jboss.ejb.FinderResults; /** * JAWSPersistenceManager CustomFindByEntitiesCommand. @@ -30,7 +30,7 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.11 $ + * @version $Revision: 1.12 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: ejort Date: 02/01/05 04:08:51 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: Guarded debug logging Revision ChangesPath 1.11 +3 -2 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.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- CustomFindByEntitiesCommand.java 2001/11/26 03:12:27 1.10 +++ CustomFindByEntitiesCommand.java 2002/01/05 12:08:51 1.11 @@ -30,7 +30,7 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand @@ -58,7 +58,8 @@ finderImplMethod = finderMethod; // set name for debugging purposes name = "Custom finder "+finderMethod.getName(); - log.debug("Finder:"+name); + if (log.isDebugEnabled()) + log.debug("Finder:"+name); } // JPMFindEntitiesCommand implementation - ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
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 ChangesPath 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 mailto:[EMAIL PROTECTED]";>Michel de Groot - * @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
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: starksm Date: 01/11/25 19:12:27 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: Drop the org.jboss.ejb.DeploymentException in favor of the org.jboss.deployment.DeploymentException class. Clean up the org.jboss.logging.Logger to use the Logger.getLogger factory method. Revision ChangesPath 1.10 +2 -2 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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- CustomFindByEntitiesCommand.java 2001/11/24 20:43:25 1.9 +++ CustomFindByEntitiesCommand.java 2001/11/26 03:12:27 1.10 @@ -30,13 +30,13 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand { // Attributes - static Logger log = Logger.create(CustomFindByEntitiesCommand.class); + static Logger log = Logger.getLogger(CustomFindByEntitiesCommand.class); /** The method implementing the finder. */ protected Method finderImplMethod; ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: starksm Date: 01/11/20 01:42:51 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp Tag: Branch_2_4 CustomFindByEntitiesCommand.java Log: Change to the unified log4j based org.jboss.logging.Logger class. Revision ChangesPath No revision No revision 1.3.4.1 +42 -33 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 retrieving revision 1.3.4.1 diff -u -r1.3 -r1.3.4.1 --- CustomFindByEntitiesCommand.java 2001/05/27 00:49:15 1.3 +++ CustomFindByEntitiesCommand.java 2001/11/20 09:42:51 1.3.4.1 @@ -30,10 +30,12 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.3 $ + * @version $Revision: 1.3.4.1 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand { + static Logger log = Logger.getLogger(CustomFindByEntitiesCommand.class); + // Attributes protected Method finderImplMethod;// method implementing the finder @@ -41,53 +43,60 @@ // Constructors -- - /** -* Constructs a JAWS command which can handle multiple entity finders + /** +* Constructs a JAWS command which can handle multiple entity finders * that are BMP implemented. * @param finderMethod the EJB finder method implementation */ public CustomFindByEntitiesCommand(Method finderMethod) - throws IllegalArgumentException + throws IllegalArgumentException { - finderImplMethod = finderMethod; - // set name for debugging purposes - name = "Custom finder "+finderMethod.getName(); - - Logger.debug("Finder:"+name); + finderImplMethod = finderMethod; + // set name for debugging purposes + name = "Custom finder "+finderMethod.getName(); + + log.debug("Finder:"+name); } - - // JPMFindEntitiesCommand implementation - + // JPMFindEntitiesCommand implementation - + public FinderResults execute(Method finderMethod, - Object[] args, - EntityEnterpriseContext ctx) + Object[] args, + EntityEnterpriseContext ctx) throws java.rmi.RemoteException, FinderException { FinderResults result = null; - + // invoke implementation method on ejb instance - try { - // if expected return type is Collection, return as is - // if expected return type is not Collection, wrap result in Collection - if (finderMethod.getReturnType().equals(Collection.class)) { - Collection coll = (Collection)finderImplMethod.invoke(ctx.getInstance(),args); + try + { + // if expected return type is Collection, return as is + // if expected return type is not Collection, wrap result in Collection + if (finderMethod.getReturnType().equals(Collection.class)) + { +Collection coll = (Collection)finderImplMethod.invoke(ctx.getInstance(),args); result = new FinderResults(coll, null, null, null); - } else { - Collection coll = new ArrayList(1); - coll.add(finderImplMethod.invoke(ctx.getInstance(),args)); + } else + { +Collection coll = new ArrayList(1); +coll.add(finderImplMethod.invoke(ctx.getInstance(),args)); result = new FinderResults(coll, null, null, null); - } - } catch (IllegalAccessException e1) { - throw new FinderException("Unable to access finder implementation:"+finderImplMethod.getName()); - } catch (IllegalArgumentException e2) { - throw new FinderException("Illegal arguments for finder implementation:"+finderImplMethod.getName()); - } catch (InvocationTargetException e3) { - throw new FinderException("Exception in finder implementation:"+finderImplMethod.getName()); - } catch (ExceptionInInitializerError e5) { - throw new FinderException("Unable to initialize finder implementation:"+finderImplMethod.getName()); + } + } catch (IllegalAccessException e1) + { + throw new FinderException("Unable to access finder i
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: starksm Date: 01/09/11 11:35:01 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: Convert all logging to org.jboss.logging.Logger which is a subclass of org.apache.log4j.Category. Revision ChangesPath 1.8 +3 -5 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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- CustomFindByEntitiesCommand.java 2001/09/01 19:50:31 1.7 +++ CustomFindByEntitiesCommand.java 2001/09/11 18:35:01 1.8 @@ -16,8 +16,6 @@ import javax.ejb.FinderException; import org.jboss.ejb.EntityEnterpriseContext; - -// TODO this needs to be replaced with the log4j logging import org.jboss.logging.Logger; import org.jboss.ejb.plugins.jaws.JPMFindEntitiesCommand; @@ -33,12 +31,13 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand { // Attributes + static Logger log = Logger.create(CustomFindByEntitiesCommand.class); /** The method implementing the finder. */ protected Method finderImplMethod; @@ -60,8 +59,7 @@ finderImplMethod = finderMethod; // set name for debugging purposes name = "Custom finder "+finderMethod.getName(); - - Logger.debug("Finder:"+name); + log.debug("Finder:"+name); } // JPMFindEntitiesCommand implementation - ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: kimptoc Date: 01/09/01 12:50:31 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: remove deprecated logging import, where possible, otherwise comment as needing replacement with log4j must find out how it is use would be good if the deprecation message pointed to an example to use... Revision ChangesPath 1.7 +11 -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.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- CustomFindByEntitiesCommand.java 2001/08/03 17:15:48 1.6 +++ CustomFindByEntitiesCommand.java 2001/09/01 19:50:31 1.7 @@ -16,7 +16,10 @@ import javax.ejb.FinderException; import org.jboss.ejb.EntityEnterpriseContext; + +// TODO this needs to be replaced with the log4j logging import org.jboss.logging.Logger; + import org.jboss.ejb.plugins.jaws.JPMFindEntitiesCommand; import org.jboss.metadata.BeanMetaData; import org.jboss.util.FinderResults; @@ -30,7 +33,7 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand @@ -87,12 +90,12 @@ throw new FinderException("Illegal arguments for finder implementation:"+finderImplMethod.getName()); } catch (ExceptionInInitializerError e5) { throw new FinderException("Unable to initialize finder implementation:"+finderImplMethod.getName()); - } catch (InvocationTargetException e) { - Throwable target = e.getTargetException(); - if(target instanceof Exception) { - throw (Exception)target; - } - throw new FinderException("Unable to initialize finder implementation: " + finderImplMethod.getName()); - } +} catch (InvocationTargetException e) { +Throwable target = e.getTargetException(); +if(target instanceof Exception) { +throw (Exception)target; +} +throw new FinderException("Unable to initialize finder implementation: " + finderImplMethod.getName()); +} } } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: dsundstrom Date: 01/07/26 14:54:14 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: Changed finders to allow application exceptions to be passed back to clients instead of being wrapped in a FinderException. This is required by the spec. The changes is based on patch #437132. Revision ChangesPath 1.5 +11 -11 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.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CustomFindByEntitiesCommand.java 2001/07/23 04:23:02 1.4 +++ CustomFindByEntitiesCommand.java 2001/07/26 21:54:14 1.5 @@ -30,7 +30,7 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand @@ -66,9 +66,8 @@ public FinderResults execute(Method finderMethod, Object[] args, EntityEnterpriseContext ctx) - throws java.rmi.RemoteException, FinderException + throws Exception { - FinderResults result = null; // invoke implementation method on ejb instance try { @@ -76,23 +75,24 @@ // if expected return type is not Collection, wrap result in Collection if (finderMethod.getReturnType().equals(Collection.class)) { Collection coll = (Collection)finderImplMethod.invoke(ctx.getInstance(),args); -result = new FinderResults(coll, null, null, null); +return new FinderResults(coll, null, null, null); } else { Collection coll = new ArrayList(1); coll.add(finderImplMethod.invoke(ctx.getInstance(),args)); -result = new FinderResults(coll, null, null, null); +return new FinderResults(coll, null, null, null); } } catch (IllegalAccessException e1) { throw new FinderException("Unable to access finder implementation:"+finderImplMethod.getName()); } catch (IllegalArgumentException e2) { throw new FinderException("Illegal arguments for finder implementation:"+finderImplMethod.getName()); - } catch (InvocationTargetException e3) { - throw new FinderException("Exception in finder implementation:"+finderImplMethod.getName()); } catch (ExceptionInInitializerError e5) { throw new FinderException("Unable to initialize finder implementation:"+finderImplMethod.getName()); - } - - return result; + } catch (InvocationTargetException e) { + Throwable target = e.getTargetException(); + if(target instanceof Exception) { + throw (Exception)target; + } + throw new FinderException("Unable to initialize finder implementation: " + finderImplMethod.getName()); + } } - } ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: deerwood Date: 01/07/22 21:23:02 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: o indentation to jboss project defaults Revision ChangesPath 1.4 +34 -29 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 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CustomFindByEntitiesCommand.java 2001/05/27 00:49:15 1.3 +++ CustomFindByEntitiesCommand.java 2001/07/23 04:23:02 1.4 @@ -30,64 +30,69 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ -public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand +public class CustomFindByEntitiesCommand + implements JPMFindEntitiesCommand { // Attributes - protected Method finderImplMethod;// method implementing the finder - - protected String name;// Command name, used for debug trace - + + /** The method implementing the finder. */ + protected Method finderImplMethod; + + /** Command name, used for debug trace. */ + protected String name; + // Constructors -- - - /** -* Constructs a JAWS command which can handle multiple entity finders + + /** +* Constructs a JAWS command which can handle multiple entity finders * that are BMP implemented. +* * @param finderMethod the EJB finder method implementation */ public CustomFindByEntitiesCommand(Method finderMethod) throws IllegalArgumentException { - finderImplMethod = finderMethod; - // set name for debugging purposes - name = "Custom finder "+finderMethod.getName(); + finderImplMethod = finderMethod; + // set name for debugging purposes + name = "Custom finder "+finderMethod.getName(); - Logger.debug("Finder:"+name); + Logger.debug("Finder:"+name); } - + // JPMFindEntitiesCommand implementation - public FinderResults execute(Method finderMethod, - Object[] args, - EntityEnterpriseContext ctx) +Object[] args, +EntityEnterpriseContext ctx) throws java.rmi.RemoteException, FinderException { FinderResults result = null; // invoke implementation method on ejb instance try { - // if expected return type is Collection, return as is - // if expected return type is not Collection, wrap result in Collection - if (finderMethod.getReturnType().equals(Collection.class)) { - Collection coll = (Collection)finderImplMethod.invoke(ctx.getInstance(),args); + // if expected return type is Collection, return as is + // if expected return type is not Collection, wrap result in Collection + if (finderMethod.getReturnType().equals(Collection.class)) { +Collection coll = (Collection)finderImplMethod.invoke(ctx.getInstance(),args); result = new FinderResults(coll, null, null, null); - } else { - Collection coll = new ArrayList(1); - coll.add(finderImplMethod.invoke(ctx.getInstance(),args)); + } else { +Collection coll = new ArrayList(1); +coll.add(finderImplMethod.invoke(ctx.getInstance(),args)); result = new FinderResults(coll, null, null, null); - } + } } catch (IllegalAccessException e1) { - throw new FinderException("Unable to access finder implementation:"+finderImplMethod.getName()); + throw new FinderException("Unable to access finder implementation:"+finderImplMethod.getName()); } catch (IllegalArgumentException e2) { - throw new FinderException("Illegal arguments for finder implementation:"+finderImplMethod.getName()); + throw new FinderException("Illegal arguments for finder implementation:"+finderImplMethod.getName()); } catch (InvocationTargetException e3) { - throw new FinderException("Exception in finder implementation:"+finderImplMethod.getName()); + throw new FinderException("Exception in finder implementation:"+finderImpl
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java
User: danch Date: 01/05/26 17:49:15 Modified:src/main/org/jboss/ejb/plugins/jaws/bmp CustomFindByEntitiesCommand.java Log: added 'read-ahead' option for finders in JAWS Revision ChangesPath 1.3 +9 -6 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.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- CustomFindByEntitiesCommand.java 2001/01/02 22:43:47 1.2 +++ CustomFindByEntitiesCommand.java 2001/05/27 00:49:15 1.3 @@ -19,6 +19,7 @@ import org.jboss.logging.Logger; import org.jboss.ejb.plugins.jaws.JPMFindEntitiesCommand; import org.jboss.metadata.BeanMetaData; +import org.jboss.util.FinderResults; /** * JAWSPersistenceManager CustomFindByEntitiesCommand. @@ -29,7 +30,7 @@ * * @see org.jboss.ejb.plugins.jaws.jdbc.JDBCFindEntitiesCommand * @author mailto:[EMAIL PROTECTED]";>Michel de Groot - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ public class CustomFindByEntitiesCommand implements JPMFindEntitiesCommand { @@ -57,22 +58,24 @@ // JPMFindEntitiesCommand implementation - - public Collection execute(Method finderMethod, + public FinderResults execute(Method finderMethod, Object[] args, EntityEnterpriseContext ctx) throws java.rmi.RemoteException, FinderException { - Collection result = null; + FinderResults result = null; // invoke implementation method on ejb instance try { // if expected return type is Collection, return as is // if expected return type is not Collection, wrap result in Collection if (finderMethod.getReturnType().equals(Collection.class)) { - result = (Collection)finderImplMethod.invoke(ctx.getInstance(),args); + Collection coll = (Collection)finderImplMethod.invoke(ctx.getInstance(),args); +result = new FinderResults(coll, null, null, null); } else { - result = new ArrayList(1); - result.add(finderImplMethod.invoke(ctx.getInstance(),args)); + Collection coll = new ArrayList(1); + coll.add(finderImplMethod.invoke(ctx.getInstance(),args)); +result = new FinderResults(coll, null, null, null); } } catch (IllegalAccessException e1) { throw new FinderException("Unable to access finder implementation:"+finderImplMethod.getName()); ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development