Hi all, Can someone give me all the test cases for hibernate? I mean't the junit test cases. Thanks in advance kamal
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 28, 2004 6:11 AM To: hibernate-devel@lists.sourceforge.net Subject: hibernate-devel digest, Vol 1 #1182 - 9 msgs Send hibernate-devel mailing list submissions to hibernate-devel@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/hibernate-devel or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of hibernate-devel digest..." Today's Topics: 1. Re: Startup performance revisited... (Binil Thomas) 2. Re: Startup performance revisited... (Emmanuel Bernard) 3. Re: Startup performance revisited... (Christian Bauer) 4. Re: Startup performance revisited... (Max Rydahl Andersen) 5. Re: Startup performance revisited... (Max Rydahl Andersen) 6. Re: Count method (Greg Handi) 7. Stored Procedure support revisited... (Max Rydahl Andersen) 8. Re: Startup performance revisited... (Christian Bauer) 9. Re: Startup performance revisited... (Binil Thomas) --__--__-- Message: 1 Date: Mon, 27 Dec 2004 10:16:15 +0530 From: Binil Thomas <[EMAIL PROTECTED]> Reply-To: Binil Thomas <[EMAIL PROTECTED]> To: Max Rydahl Andersen <[EMAIL PROTECTED]> Subject: Re: [Hibernate] Startup performance revisited... Cc: Hibernate development <hibernate-devel@lists.sourceforge.net> Hi Max, Couple of months ago we were evaluating the use of Hibernate, and were ran some performance comparisons between popular ORM tools. One of the things we noticed is that serialization of lazy initialization poxies is time consuming. I admit that when using Hibernate entities as DTOs the proxy fields should be nulled out, ideally. But what we would like to understand is, in your tests have you noticed this before? If so, what kind of impact does it impose on serialization of entities? Thanks, Binil PS: We chose to go with Hibernate, BTW :-) On Sun, 26 Dec 2004 22:30:03 +0100, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: > Hi guys, > > Just reran a set of startup performance tests, to see if something has > changed or I would be able to point out some new places > to put in some speedups. Unfortunately (or as expected) not much has > changed. > > The same pattern always emerge on startup performance: > > #1. xml reading is 40-60% if one doesnt use the serialized version...so > use addCachableFile() to do an EASY performance boost! > #2. FastClass creation takes 23% (when using serialized xml files). After > looking at the source I could see that fastclass is ONLY > needed when the cglib optimizer is used, so I removed creation of > fastClass'es. > The "funny" thing is that I don't think it makes any difference since > after removing this ClassLoader and normal reflection popped up > as using approximate the same time. (hinting that FastClass just > triggered that in a different way). So disabling cglib optimizer might not > give that much of a boost..my emperi hints it's <5%) > #3. After #1 & #2 the biggest time-stealer is reflection and classloading. > (nothing much to do about this except not adding classes not needed to > the configuration) > > So, caching the classes generated by cglib I do not think will matter much > since it will be replaced with classloading. > The next step I see is lazy creation of EntityPersisters and/or trying to > serialize the actual SessionFactory (but that is a tough one - since to > alloew deserializing parts of the persisters, loaders, caches etc. need > access to stuff only available in SessionFactory which they don't all have > access to) > > -- > Max Rydahl Andersen > callto://max.rydahl.andersen > > Hibernate > [EMAIL PROTECTED] > http://hibernate.org > > JBoss Inc > [EMAIL PROTECTED] > http://jboss.com > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > hibernate-devel mailing list > hibernate-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --__--__-- Message: 2 Date: Mon, 27 Dec 2004 09:28:04 +0100 (CET) From: Emmanuel Bernard <[EMAIL PROTECTED]> Subject: Re: [Hibernate] Startup performance revisited... To: Max Rydahl Andersen <[EMAIL PROTECTED]>, Hibernate development <hibernate-devel@lists.sourceforge.net> If 1 day in 2005 you can run the tests on annotations, it would be great. I'm wondering how the XML 40% become using annotations. --- Max Rydahl Andersen <[EMAIL PROTECTED]> a écrit : > Hi guys, > > Just reran a set of startup performance tests, to > see if something has > changed or I would be able to point out some new > places > to put in some speedups. Unfortunately (or as > expected) not much has > changed. > > The same pattern always emerge on startup > performance: > > #1. xml reading is 40-60% if one doesnt use the > serialized version...so > use addCachableFile() to do an EASY performance > boost! > #2. FastClass creation takes 23% (when using > serialized xml files). After > looking at the source I could see that fastclass is > ONLY > needed when the cglib optimizer is used, so I > removed creation of > fastClass'es. > The "funny" thing is that I don't think it > makes any difference since > after removing this ClassLoader and normal > reflection popped up > as using approximate the same time. > (hinting that FastClass just > triggered that in a different way). So disabling > cglib optimizer might not > give that much of a boost..my emperi hints it's > <5%) > #3. After #1 & #2 the biggest time-stealer is > reflection and classloading. > (nothing much to do about this except not adding > classes not needed to > the configuration) > > So, caching the classes generated by cglib I do not > think will matter much > since it will be replaced with classloading. > The next step I see is lazy creation of > EntityPersisters and/or trying to > serialize the actual SessionFactory (but that is a > tough one - since to > alloew deserializing parts of the persisters, > loaders, caches etc. need > access to stuff only available in SessionFactory > which they don't all have > access to) > > -- > Max Rydahl Andersen > callto://max.rydahl.andersen > > Hibernate > [EMAIL PROTECTED] > http://hibernate.org > > JBoss Inc > [EMAIL PROTECTED] > http://jboss.com > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > hibernate-devel mailing list > hibernate-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ --__--__-- Message: 3 Date: Mon, 27 Dec 2004 11:41:31 +0200 From: Christian Bauer <[EMAIL PROTECTED]> To: Hibernate development <hibernate-devel@lists.sourceforge.net> Subject: Re: [Hibernate] Startup performance revisited... Binil Thomas wrote: > I admit that when using Hibernate entities as DTOs > the proxy fields should be nulled out, ideally. But a null is not the same as an unloaded object. I think this was discussed a few times before. -- Christian Bauer +49 171 455 66 53 callto://christian-bauer Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss Inc [EMAIL PROTECTED] http://jboss.com --__--__-- Message: 4 To: "Binil Thomas" <[EMAIL PROTECTED]> Cc: "Hibernate development" <hibernate-devel@lists.sourceforge.net> Subject: Re: [Hibernate] Startup performance revisited... Date: Mon, 27 Dec 2004 11:42:59 +0100 From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> On Mon, 27 Dec 2004 10:16:15 +0530, Binil Thomas <[EMAIL PROTECTED]> wrote: > Hi Max, > > Couple of months ago we were evaluating the use of Hibernate, and were > ran some performance comparisons between popular ORM tools. One of the > things we noticed is that serialization of lazy initialization poxies > is time consuming. Meaning ? In Hibernate a non initialized proxy should not be slow to serialize, but a initialized one is of course just as slow as a fully initialized object.... Aren't you just seeing these as time consuming because these are the objects you have the most of and that if they were not lazy objects they would still be there as hotspots just as ordinary serialization is. > I admit that when using Hibernate entities as DTOs > the proxy fields should be nulled out, ideally. I don't think they should be nulled out... > But what we would like to understand is, in your tests have you > noticed this before? If so, what kind of impact does it impose on > serialization of entities? my current focus has been startup time and here the primary timestealer is as written xml reading and that can be improved imensly by simple using serialization - next after it is the classloading that takes time (because hibernate need to identify these classes up front) I haven't seen that serialization of lazy objects should be heavier than expected (meaning similar as normal objects + in collections their might be more to transport than normal since we need to track what has been deleted/inserted....but that is nothing different that what you yourself should have done if working without hibernate) If you have measurements that show otherwise then I would be interested in seeing them...(including of course the code that you measured on ,) /max > > Thanks, > Binil > > PS: We chose to go with Hibernate, BTW :-) > > On Sun, 26 Dec 2004 22:30:03 +0100, Max Rydahl Andersen > <[EMAIL PROTECTED]> wrote: >> Hi guys, >> >> Just reran a set of startup performance tests, to see if something has >> changed or I would be able to point out some new places >> to put in some speedups. Unfortunately (or as expected) not much has >> changed. >> >> The same pattern always emerge on startup performance: >> >> #1. xml reading is 40-60% if one doesnt use the serialized version...so >> use addCachableFile() to do an EASY performance boost! >> #2. FastClass creation takes 23% (when using serialized xml files). >> After >> looking at the source I could see that fastclass is ONLY >> needed when the cglib optimizer is used, so I removed creation of >> fastClass'es. >> The "funny" thing is that I don't think it makes any difference >> since >> after removing this ClassLoader and normal reflection popped up >> as using approximate the same time. (hinting that FastClass >> just >> triggered that in a different way). So disabling cglib optimizer might >> not >> give that much of a boost..my emperi hints it's <5%) >> #3. After #1 & #2 the biggest time-stealer is reflection and >> classloading. >> (nothing much to do about this except not adding classes not needed to >> the configuration) >> >> So, caching the classes generated by cglib I do not think will matter >> much >> since it will be replaced with classloading. >> The next step I see is lazy creation of EntityPersisters and/or trying >> to >> serialize the actual SessionFactory (but that is a tough one - since to >> alloew deserializing parts of the persisters, loaders, caches etc. need >> access to stuff only available in SessionFactory which they don't all >> have >> access to) >> >> -- >> Max Rydahl Andersen >> callto://max.rydahl.andersen >> >> Hibernate >> [EMAIL PROTECTED] >> http://hibernate.org >> >> JBoss Inc >> [EMAIL PROTECTED] >> http://jboss.com >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://productguide.itmanagersjournal.com/ >> _______________________________________________ >> hibernate-devel mailing list >> hibernate-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/hibernate-devel >> -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss Inc [EMAIL PROTECTED] http://jboss.com --__--__-- Message: 5 To: "Emmanuel Bernard" <[EMAIL PROTECTED]>, "Hibernate development" <hibernate-devel@lists.sourceforge.net> Subject: Re: [Hibernate] Startup performance revisited... Date: Mon, 27 Dec 2004 11:47:24 +0100 From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> On Mon, 27 Dec 2004 09:28:04 +0100 (CET), Emmanuel Bernard =20 <[EMAIL PROTECTED]> wrote: > If 1 day in 2005 you can run the tests on annotations, > it would be great. I'm wondering how the XML 40% > become using annotations. My guess is that if annotations "reflection" is ok it will be similar to serialized version of xml - but i'll need to check. I also become aware (over night and via a tip from christian) that I should look into how it runs on Java 5 with their new .jar pack2000 =20 format. That should speed up classloading (so they claim ,) /max > > --- Max Rydahl Andersen <[EMAIL PROTECTED]> a > =E9crit : >> Hi guys, >> >> Just reran a set of startup performance tests, to >> see if something has >> changed or I would be able to point out some new >> places >> to put in some speedups. Unfortunately (or as >> expected) not much has >> changed. >> >> The same pattern always emerge on startup >> performance: >> >> #1. xml reading is 40-60% if one doesnt use the >> serialized version...so >> use addCachableFile() to do an EASY performance >> boost! >> #2. FastClass creation takes 23% (when using >> serialized xml files). After >> looking at the source I could see that fastclass is >> ONLY >> needed when the cglib optimizer is used, so I >> removed creation of >> fastClass'es. >> The "funny" thing is that I don't think it >> makes any difference since >> after removing this ClassLoader and normal >> reflection popped up >> as using approximate the same time. >> (hinting that FastClass just >> triggered that in a different way). So disabling >> cglib optimizer might not >> give that much of a boost..my emperi hints it's >> <5%) >> #3. After #1 & #2 the biggest time-stealer is >> reflection and classloading. >> (nothing much to do about this except not adding >> classes not needed to >> the configuration) >> >> So, caching the classes generated by cglib I do not >> think will matter much >> since it will be replaced with classloading. >> The next step I see is lazy creation of >> EntityPersisters and/or trying to >> serialize the actual SessionFactory (but that is a >> tough one - since to >> alloew deserializing parts of the persisters, >> loaders, caches etc. need >> access to stuff only available in SessionFactory >> which they don't all have >> access to) >> >> -- >> Max Rydahl Andersen >> callto://max.rydahl.andersen >> >> Hibernate >> [EMAIL PROTECTED] >> http://hibernate.org >> >> JBoss Inc >> [EMAIL PROTECTED] >> http://jboss.com >> >> >> > ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT >> Products from real users. >> Discover which products truly live up to the hype. >> Start reading now. >> http://productguide.itmanagersjournal.com/ >> _______________________________________________ >> hibernate-devel mailing list >> hibernate-devel@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel >> > > > =09 > > =09 > =09 > D=E9couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour v= os =20 > mails ! > Cr=E9ez votre Yahoo! Mail sur http://fr.mail.yahoo.com/ --=20 Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss Inc [EMAIL PROTECTED] http://jboss.com --__--__-- Message: 6 Date: Mon, 27 Dec 2004 11:43:46 -0800 (PST) From: Greg Handi <[EMAIL PROTECTED]> Subject: Re: [Hibernate] Count method To: Christian Bauer <[EMAIL PROTECTED]>, hibernate-devel@lists.sourceforge.net +1 I'm definitely all for it! About time too! --- Christian Bauer <[EMAIL PROTECTED]> wrote: > How about some christmas controversy (or christmas present, depending > on > your position): > > +1 for applying the Criteria.count() patch in 2.1.8 and be done with > it > for Hibernate2. If we are going to design a Criteria API in the > 3.0/3.1 > timeline, it doesn't matter what happens to 2.1. > > -- > Christian Bauer > +49 171 455 66 53 > callto://christian-bauer > > Hibernate > [EMAIL PROTECTED] > http://hibernate.org > > JBoss Inc > [EMAIL PROTECTED] > http://jboss.com > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > > http://productguide.itmanagersjournal.com/ > _______________________________________________ > hibernate-devel mailing list > hibernate-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250 --__--__-- Message: 7 Date: Mon, 27 Dec 2004 23:49:57 +0100 From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> To: "Hibernate development" <hibernate-devel@lists.sourceforge.net> Subject: [Hibernate] Stored Procedure support revisited... Hi Guys, It must be the holidays that make me go revisiting stuff ,) This time it is SP support in H3. I *think* I can add it in a couple of hours (at least as a first attempt ,), but want to throw the issues/solution out there for you to look at before doing the necessary changes. Currently we CUD support, and are missing the R (read, querying) support. We have two "blockers" preventing us from doing this: #1 Important database vendors (read oracle) has proprietary methods for preparing and retreving a resultset from a CallableStatement. (see http://www.enterprisedt.com/publications/oracle/result_set.html) #2 Since Hibernate requires specific (not-visible-to-users) aliases we dont have any way for users to specify which resultset column should map to a certain alias. (in SQLLoader this is "solved" by having users insert {entitynameref.propertyname} syntax into the sql string) Ok - so what to do about this: For #1 it seems sufficient that we add Dialect controlled preparation of CallableStatements (basically registrering an outParameter in oracle) to Loader.prepareQueryStatement() and in getResultSet() we either call executeQuery() or execute() depending on what Dialect wants. This will allow us to mark <sql-query>'s as callable and execute them as such. #2 is worse since much of the code assumes special alias names for columns that in SP's normally would just be a column name (USERNAME vs. USERNAME_x1)....but two things has arrived recently that makes this much easier - WrappedResultset and ResultSetDescriptor (the last one I actually just discovered while writing this email, so now I got 2 solutions for #2) Today we do the following: <sql-query name="namedsql"> <return alias="category" class="org.hibernate.test.legacy.Category"/> <return alias="assignable" class="org.hibernate.test.legacy.Assignable"/> select {category.*}, {assignable.*} from Category {category}, "assign-able" {assignable} where Category.x = :someparameter </sql-query> We convert the {}'s to the aliases hibernate need. With SP's we (or rather users) don't have a natural place and "liberty" to put in the alias conversion. My original idea were to use WrappedResultSet to add a custom mapping from hibernate wanted aliasname to the userdriven name in the SP. This would be specified in <sql-query> with something like this: <sql-query name="queryStuffWithSP"> <return alias="category" class="org.hibernate.test.legacy.Category"> <!-- some syntax for mapping properties/columns to whatever the returned resultset contains --> </return> <return alias="assignable" class="org.hibernate.test.legacy.Assignable"> <!-- nothing specified assume alias==columname --> </return> { ? = call queryStuffSP(:named,:parameters,:workshere,:too)} </sql-query> ...but this leads to kind'a "double-mapping" because the users has already specifiec that name-to-alias binding before (in the class mapping) and when thinking about multicolumned properties it gets even worse and more redundant. So, I will look into extract that information automatically and be the default...so i'll simply assume the column names specified in the mapping for the entity is the exact same, but allow users to override it via "some syntax for mapping..."-segment which I haven't yet found a good way of specifying (any ideas ?) The second idea is similar for the user as above, but i'll simply use the new ResultSetDescriptor to handle the mapping (much cleaner and performant ,) (one could argue we might should also add a more SQL specific StoredProcedurePersister and allow users to map usertypes etc. directly to stored procedures - but I don't think that will be of much benefit compared to having SP support (or rather callable-support) in the default persister/loader hiearchy since I think that most users use a mix of SP's and good-old-sql - but that's just me, what do you think/know ?) This turned into a rather long mail - but I hope you get the idea....comments are very welcome - especially on a syntax for the "alias-to-column" ... -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss Inc [EMAIL PROTECTED] http://jboss.com --__--__-- Message: 8 Date: Tue, 28 Dec 2004 00:25:24 +0200 From: Christian Bauer <[EMAIL PROTECTED]> To: Hibernate development <hibernate-devel@lists.sourceforge.net> Subject: Re: [Hibernate] Startup performance revisited... Binil Thomas wrote: > It isnt. An unloaded proxy can throw an Exception if it is accessed > when detached. > But what we want to know is cost of serializing an entity with these proxies. I don't know, but I'd say serialization implies a slow process itself (ie. for remote communication) and the proxies should not be slower or faster or play any significant role in that. Do you have tests or numbers to show that they are a performance problem? -- Christian Bauer +49 171 455 66 53 callto://christian-bauer Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss Inc [EMAIL PROTECTED] http://jboss.com --__--__-- Message: 9 Date: Tue, 28 Dec 2004 06:10:19 +0530 From: Binil Thomas <[EMAIL PROTECTED]> Reply-To: Binil Thomas <[EMAIL PROTECTED]> To: Christian Bauer <[EMAIL PROTECTED]> Subject: Re: [Hibernate] Startup performance revisited... Cc: Hibernate development <hibernate-devel@lists.sourceforge.net> Hi Christian, On Tue, 28 Dec 2004 00:25:24 +0200, Christian Bauer <[EMAIL PROTECTED]> wrote: > Binil Thomas wrote: > > > It isnt. An unloaded proxy can throw an Exception if it is accessed > > when detached. > > But what we want to know is cost of serializing an entity with these > > proxies. > > I don't know, but I'd say serialization implies a slow process itself > (ie. for remote communication) and the proxies should not be slower or > faster or play any significant role in that. Do you have tests or > numbers to show that they are a performance problem? Right now, I dont. We had started writing some tests, but then it went out of focus. We will complete those tests and see if we get more concrete results, and post it as a support case. Meanwhile, my initial email was to check with the Hibernate team if you guys have seen anything strange there - guess you havent. :-) Thanks, Binil --__--__-- _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel End of hibernate-devel Digest This email may contain material that is confidential, privileged and/or attorney work product for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel