2nd level cache eliminates a lot of database roundtrips by caching data on
the application server. Check out 
http://www.informit.com/articles/article.asp?p=353736&seqNum=5
if you are really interested.

Imho 2nd level cache in a web app is one of the more critical aspects
escpecially when your app is the only one accessing the tables (which is
usually the case).

There is a rfe in hibernate to allow the criteria api to use 2nd level cache
just like the query api does, but no scheduled date yet
http://opensource.atlassian.com/projects/hibernate/browse/HB-308

I know it is significantly easier to do this using the criteria api, but I
think it would be better to invest more time and come up with an approach
that can work on hql since ejb3ql is almost exactly the same and so you
would get ejb3 support for free.

Im currently using something like this:

public interface QlConstraint {
        boolean shouldUse();

        /** add ql to the query */
        void onAddQl(StringBuilder hql);

        /** bind parameters */
        void onAddParams(Query q);
}

My dao gets a list of these and loops over them. Its not completely fool
proof yet but it works for simpler quieries.

Igor


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Jonathan Carlson
> Sent: Wednesday, July 20, 2005 9:02 AM
> To: [email protected]; [EMAIL PROTECTED]
> Subject: RE: [Wicket-user] A crack at RAD.
> 
> Oops, I should have clarified...  I was referring to the 
> dynamic query filtering and ordering.  As far as I can tell, 
> that might require the Query Criteria stuff.
> 
> >>> [EMAIL PROTECTED] 2005-07-20 10:58:22 AM >>>
> I really don't know Hibernate, (I'm not sure what 2nd level 
> cache is) but I don't think that this would be possible 
> without using the Query Criteria.  At least it would be very 
> ugly as I think we'd have to generate dynamic query strings ourselves.
> 
> 
> 
> >>> [EMAIL PROTECTED] 2005-07-20 10:50:38 AM >>>
> I might be wrong but I do not think the criteria api support 
> 2nd level cache when retrieving multiple objects which is a 
> must for something like this.
> 
> Igor
>  
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Phil 
> > Kulak
> > Sent: Wednesday, July 20, 2005 8:34 AM
> > To: [email protected]
> > Subject: Re: [Wicket-user] A crack at RAD.
> > 
> > XDocs would be cool. I'm pretty bad with Maven though, so 
> yea, someone 
> > else would have to do that. Also, we'd need to figure out 
> how to get 
> > stuff out of "sandbox" packages. I haven't done it because there's 
> > some of Eelco's functionality that I didn't reproduce, but I also 
> > couldn't figure out the use cases, so I don't know how 
> important said 
> > functionality is.
> > 
> > I also wouldn't mind saying goodbye to Hibernate2 support. I tried 
> > making an IDataSource for Hibernate2, but the API is a lot more 
> > limited and it looks like it would be tricky, if not 
> impossible. Also, 
> > that way I can focus on an EJB3 IDataSource.
> > 
> > Jonathan, I think something like your QueryFilter interface 
> could work 
> > well. The only thing that seems like it could be tricky 
> with filters 
> > is all the string query manipulation we'd have to add for 
> Hibernate. I 
> > originally tried using criteria queries to avoid that problem, but 
> > then adding an ordering becomes difficult if it uses a 
> join. I think 
> > though, that if we add filters, we're going to have to 
> figure out how 
> > to use criteria queries, or risk rewriting the whole API with a 
> > slightly different syntax.
> > 
> > On 7/20/05, Jonathan Carlson <[EMAIL PROTECTED]> wrote:
> > > I have some dynamic query filtering classes/interfaces that
> > I need to
> > > abstract out to work with either Cayenne or Hibernate.  It would
> be
> 
> > > cool to add that to Phil's component.
> > > 
> > > - Jonathan
> > > 
> > > >>> [EMAIL PROTECTED] 2005-07-20 2:21:11 AM >>>
> > > very nice.
> > > 
> > > just an idea: What you think about a search / filter bar. 
> > Input fields
> > > etc. to limit (filter) the result set. A bar above all columns and
> 
> > > once you hit return or press a button the filters are applied.
> > > 
> > > Juergen
> > > 
> > > On 7/20/05, Phil Kulak <[EMAIL PROTECTED]> wrote:
> > > > If anyone would like to read my little writup, possibly 
> > try out the 
> > > > demo app, and give me feedback, I'd apreciate it. I would 
> > have put 
> > > > this on the Wiki, but I wanted to include screenshots so 
> > that people 
> > > > wouldn't have to run the app to see what I was talking about.
> This
> > > is
> > > > in CVS as well, in wicket-contrib-data and then the 
> > Hibernate data 
> > > > source classes are at wicket-contrib-hibernate-3.0. Thanks!
> > > >
> > > > http://www.cs.uoregon.edu/~torok/GridPanelDocs/ 
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > SF.Net email is sponsored by: Discover Easy Linux Migration
> > > Strategies
> > > > from IBM. Find simple to follow Roadmaps, straightforward 
> > articles, 
> > > > informative Webcasts and more! Get everything you need to 
> > get up to 
> > > > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opclick 
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [email protected] 
> > > > https://lists.sourceforge.net/lists/listinfo/wicket-user 
> > > >
> > > 
> > > 
> > > -------------------------------------------------------
> > > SF.Net email is sponsored by: Discover Easy Linux Migration 
> > Strategies 
> > > from IBM. Find simple to follow Roadmaps, straightforward
> articles,
> 
> > > informative Webcasts and more! Get everything you need to get up
> to
> 
> > > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click 
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected] 
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user 
> > > 
> > > 
> >
> ______________________________________________________________________
> > > This email has been scanned by the MessageLabs Email 
> > Security System.
> > > For more information please visit http://www.messagelabs.com/email
> 
> 
> > > 
> >
> ______________________________________________________________________
> > > 
> > > 
> >
> ______________________________________________________________________
> > > This email and any files transmitted with it are confidential and 
> > > intended solely for the use of the individual or entity to 
> > whom they 
> > > are addressed. If you have received this email in error 
> > please notify 
> > > the system manager.
> > > 
> > > Katun Corporation -- www.katun.com 
> > > 
> >
> _____________________________________________________________________
> > > 
> > > 
> > > -------------------------------------------------------
> > > SF.Net email is sponsored by: Discover Easy Linux Migration 
> > Strategies 
> > > from IBM. Find simple to follow Roadmaps, straightforward
> articles,
> 
> > > informative Webcasts and more! Get everything you need to get up
> to
> 
> > > speed, fast.
> http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click 
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected] 
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user 
> > >
> > 
> > 
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration 
> > Strategies from IBM. Find simple to follow Roadmaps, 
> > straightforward articles, informative Webcasts and more! Get 
> > everything you need to get up to speed, fast. 
> > http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick 
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected] 
> > https://lists.sourceforge.net/lists/listinfo/wicket-user 
> > 
> > 
> > 
> 
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click 
> _______________________________________________
> Wicket-user mailing list
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/wicket-user 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
> 
> ______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> Katun Corporation -- www.katun.com 
> _____________________________________________________________________
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click 
> _______________________________________________
> Wicket-user mailing list
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/wicket-user 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
> 
> ______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> Katun Corporation -- www.katun.com 
> _____________________________________________________________________
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> 




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to