[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFinderCommand.java
User: starksm Date: 01/12/08 16:51:28 Modified:src/main/org/jboss/ejb/plugins/jaws/jdbc Tag: Branch_2_4 JDBCFinderCommand.java Log: Applied patch 486426 for FinderException message Revision ChangesPath No revision No revision 1.11.2.1 +13 -7 jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFinderCommand.java Index: JDBCFinderCommand.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFinderCommand.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- JDBCFinderCommand.java2001/06/13 06:52:17 1.11 +++ JDBCFinderCommand.java2001/12/09 00:51:27 1.11.2.1 @@ -35,7 +35,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a * @author a href=mailto:[EMAIL PROTECTED];Joe Shevland/a * @author a href=mailto:[EMAIL PROTECTED];Justin Forder/a - * @version $Revision: 1.11 $ + * @version $Revision: 1.11.2.1 $ */ public abstract class JDBCFinderCommand extends JDBCQueryCommand @@ -51,7 +51,8 @@ finderMetaData = f; } - public FinderMetaData getFinderMetaData() { + public FinderMetaData getFinderMetaData() + { return finderMetaData; } @@ -91,18 +92,23 @@ sql.toUpperCase(); int pos = sql.indexOf(WHERE); String where = ; - if (pos != -1) { + if (pos != -1) + { where = sql.substring(pos); } - if (finderMetaData.hasReadAhead()) { + if (finderMetaData.hasReadAhead()) + { result = new FinderResults(keys, where, this, args); - } else { + } + else + { result = new FinderResults(keys, null, null, null); } - } catch (Exception e) + } + catch (Exception e) { log.debug(e); - throw new FinderException(Find failed); + throw new FinderException(Find failed, msg=+e.toString()); } 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/jdbc JDBCFinderCommand.java
User: user57 Date: 01/08/16 15:23:30 Modified:src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFinderCommand.java Log: o When execute() failes, log an error (instead of a debug) and throw FinderException with more detail about the problem. Revision ChangesPath 1.15 +14 -11 jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFinderCommand.java Index: JDBCFinderCommand.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFinderCommand.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- JDBCFinderCommand.java2001/08/12 10:46:22 1.14 +++ JDBCFinderCommand.java2001/08/16 22:23:30 1.15 @@ -38,7 +38,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Joe Shevland/a * @author a href=mailto:[EMAIL PROTECTED];Justin Forder/a * @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a - * @version $Revision: 1.14 $ + * @version $Revision: 1.15 $ * * pbRevisions:/b * @@ -81,20 +81,23 @@ } - /** This method must be overridden to return the where clause used in -* this query. This must start with the keyword 'WHERE' and include all -* conditions needed to execute the query properly. + /** +* This method must be overridden to return the where clause used in +* this query. This must start with the keyword 'WHERE' and include all +* conditions needed to execute the query properly. */ public abstract String getWhereClause(); - /** This method must be ovverridden to return the full table list for -* the query, including any join statements. This must start with the -* keyword 'FROM' and include all tables needed to execute the query properly. + /** +* This method must be ovverridden to return the full table list for +* the query, including any join statements. This must start with the +* keyword 'FROM' and include all tables needed to execute the query properly. */ public abstract String getFromClause(); - /** This method must be ovverridded to return the full order by clause for -* the query, including the 'ORDER BY' keyword. + /** +* This method must be ovverridded to return the full order by clause for +* the query, including the 'ORDER BY' keyword. */ public abstract String getOrderByClause(); @@ -113,8 +116,8 @@ result = new FinderResults(keys, null, null, null); } catch (Exception e) { - if (log.isDebugEnabled()) log.debug(Exception, e); - throw new FinderException(Find failed); + log.error(Failed to create finder results, e); + throw new FinderException(Find failed: + e); } return result; ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFinderCommand.java
We need to talk a little bit here - my long term notion for the finderresults was to extend it into the invoker layers so that the collection that a client gets from these would be a proxy over the finder results. At that point we could add a 'page-size' parameter and a protocol between the client proxy and the server-side FinderResults to request that a new page of entities be brought into memory. This would allow us to support finders returning truly huge result sets without crashing out on memory. Naturally, this would really only be useful from batch processes for example (no matter how well we optimize, no user is going to sit while the software goes through 10 million rows!), so the real utility of it could easily be questioned. Would such a feature seem useful to you? Any others with opinions on the matter? Yeah, I saw your comment in CMPPersistenceManager. It's a great idea! But, I just don't like having code hanging around that isn't being used and is there for possible future features. What happens sometimes is that the future feature is never implemented and different people end up maintaining that code base and are confused about why the code is there. IMHO, FinderResults isn't being used now, so it should be removed until the 'remote cursor' feature is added. Good enough. We're also going to have to coordinate with Dain to make sure that these optimizations get over into the 2.0 CMP stuff. I've only looked at that briefly so far. -danch ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFinderCommand.java
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of danch (Dan Christopherson) Sent: Thursday, June 21, 2001 6:35 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFinderCommand.java [EMAIL PROTECTED] wrote: User: patriot1burke Date: 01/06/21 14:57:22 Modified:src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFinderCommand.java Log: added constructor to facilitate re-use. Removed extra login for setting up FinderResults since this class is really not used anymore. Bill, We need to talk a little bit here - my long term notion for the finderresults was to extend it into the invoker layers so that the collection that a client gets from these would be a proxy over the finder results. At that point we could add a 'page-size' parameter and a protocol between the client proxy and the server-side FinderResults to request that a new page of entities be brought into memory. This would allow us to support finders returning truly huge result sets without crashing out on memory. Naturally, this would really only be useful from batch processes for example (no matter how well we optimize, no user is going to sit while the software goes through 10 million rows!), so the real utility of it could easily be questioned. Would such a feature seem useful to you? Any others with opinions on the matter? Yeah, I saw your comment in CMPPersistenceManager. It's a great idea! But, I just don't like having code hanging around that isn't being used and is there for possible future features. What happens sometimes is that the future feature is never implemented and different people end up maintaining that code base and are confused about why the code is there. IMHO, FinderResults isn't being used now, so it should be removed until the 'remote cursor' feature is added. Cool stuff though! Bill ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFinderCommand.java
I really like the way you designed this: the PreloadFinderCommand acting as a decorator really makes things clearer. This is getting faster everytime one of us touches it. Something I noticed, Bill - your changes only worked for defined finders. I've extended them so that they work for findAll and the regular autogenerated findByField stuff as well. To support this I changed the 'defined' member of JDBCPreloadFinderCommand to be a JDBCFinderCommand (superclass of all finders) and made his setParameters method simply delegate to the embedded finder command. I also changed the name of the embedded finder to finderDelegate: I think that's more descriptive now. I'm going to test that a bit more, then check in. -danch [EMAIL PROTECTED] wrote: User: patriot1burke Date: 01/06/21 14:57:22 ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development