You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
(157) |
Mar
(111) |
Apr
(61) |
May
(68) |
Jun
(45) |
Jul
(101) |
Aug
(132) |
Sep
(148) |
Oct
(227) |
Nov
(141) |
Dec
(285) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(518) |
Feb
(462) |
Mar
(390) |
Apr
(488) |
May
(321) |
Jun
(336) |
Jul
(268) |
Aug
(374) |
Sep
(211) |
Oct
(246) |
Nov
(239) |
Dec
(173) |
2004 |
Jan
(110) |
Feb
(131) |
Mar
(85) |
Apr
(120) |
May
(82) |
Jun
(101) |
Jul
(54) |
Aug
(65) |
Sep
(94) |
Oct
(51) |
Nov
(56) |
Dec
(168) |
2005 |
Jan
(146) |
Feb
(98) |
Mar
(75) |
Apr
(118) |
May
(85) |
Jun
(75) |
Jul
(44) |
Aug
(94) |
Sep
(70) |
Oct
(84) |
Nov
(115) |
Dec
(52) |
2006 |
Jan
(113) |
Feb
(83) |
Mar
(217) |
Apr
(158) |
May
(219) |
Jun
(218) |
Jul
(189) |
Aug
(39) |
Sep
(3) |
Oct
(7) |
Nov
(4) |
Dec
(2) |
2007 |
Jan
|
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(3) |
Jun
(8) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(7) |
Dec
|
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2009 |
Jan
(6) |
Feb
|
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(10) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rachel K. <Rac...@fb...> - 2006-08-15 20:02:20
|
I will be out of the office starting 08/14/2006 and will not return un= til 08/21/2006. I will respond to your message when I return. __________________________________________ The information contained in this message may be privileged and confidential and protected from disclosure. If you are not the intended= recipient of this message, you are hereby notified that any disseminati= on, distribution, or copying of this communication is strictly prohibited. = If you have received this communication in error, please notify us immedia= tely by replying to the message, and please delete it from your computer.= |
From: zqzuk <ziq...@ho...> - 2006-08-15 12:36:54
|
Hi, i wouldlike to use aggregate functions in HQL, and i got such problems while experimenting with the query... i have a class Booking like Booking(id, tutor,week,package,date,fee,term,note,student,order) i wouldl like to do a query as such : " "SELECT DISTINCT tutor, week, COUNT(DISTINCT student) AS numOfStudents FROM Booking WHERE term=:tm GROUP BY tutor,week" problem 1 is - the query does not work because i got an error telling me that group by clause must include all variables of this Booking class, i e , i changed my query to "SELECT DISTINCT tutor, week, COUNT(DISTINCT student) AS numOfStudents FROM Booking WHERE term=:tm GROUP BY tutor,week, id, package, date,fee,term,note,student,order" and it works. however, it seems that the query produces a list of Booking objects, not only the variables tutor, week, and numOfStudents as specified in the SELECT clause. as a result i got 2nd problem problem 2 - i actually defined another class called "Rota(tutor, week, numOfStudents)" and i did Rota t = (Rota) queryResult.get(0); and i got a ClassCastException. i guess the reason is that the query produces a list of Booking objects other than the only selected variables as in the select clause; therefore i changed to Booking b =(Booking) queryResult.get(0); unsurprisingly it doesnt work i guess its because in the select clause i have another variable "numOfStudnets" which is not defined in Booking. i dont know what to do... i certainly donot want to add a variable of "numOfStudent" to Booking class.. but i dont know any other solutions to this problems. seems HQL makes aggregate query much more complicated, or im doin this in totally wrong way? all in all, all i want to do is to get the values of "tutor, week, and numberOfStudents" from the query, nothing else. any ideas please help! thank you. -- View this message in context: http://www.nabble.com/use-aggregate-functions-tf2108930.html#a5813279 Sent from the Hibernate forum at Nabble.com. |
From: zqzuk <ziq...@ho...> - 2006-08-12 16:13:53
|
well i got the setters wrong.... being so stupid i am... sry for creating such a long and massy thread. -- View this message in context: http://www.nabble.com/help-pls%2C-very-strange-problem-tf2095717.html#a5777031 Sent from the Hibernate forum at Nabble.com. |
From: zqzuk <ziq...@ho...> - 2006-08-12 15:48:17
|
Hi, i got such a strange problem that im sure you ll think im doin crazy talk :) , i dont see why this would happen at all, i have a class called "Package", mapped to a table "package". whenever i do a query on this table using hibernate, even the simplest "find all" kinda of query, hibernate does update on the table b4 doin the query! even more weird, it does the update when the first query on this table happens, it deletes all values of a column (yes only this column); then if i do the same query again, no update at all. however if now i mannuall add those missing values, it does the update again and deletes them! sry its confusing, heres my code and more of wat i done: The mapping Package.hbm.xml <hibernate-mapping package="tuition.bo"> <class name="Package" table="package"> <id name="id" column="study_package_id" type="long"> <generator class="sequence"/> </id> <property name="name" column="name" not-null="true"/> <property name="satTiming" column="sat_timing" not-null="false"/> <property name="satSubjects" column="sat_subjects" not-null="false"/> <property name="sunTiming" column="sun_timing" not-null="false"/> <property name="sunSubjects" column="sun_subjects" not-null="false"/> <set name="classes" inverse="true" cascade="delete-orphan" lazy="true"> <key column="package_id"/> <one-to-many class="Class"/> </set> </class> </hibernate-mapping> For example initialy i populated database using hibernate, like this: package_id, name, sat_timing, sat_subjects, sun_timing, sun_subjects 1 no.1 9-12 business 9-12 law 2 no.2 9-11 business 9-11 law Then after i populated this database, i did this query: List res=getHibernateTemplate().find("FROM Package"); and you can see the log file as such: (excerpt) 16:23:06,687 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions) 16:23:06,703 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) 16:23:09,968 DEBUG JDBCTransaction:46 - begin 16:23:09,968 DEBUG JDBCTransaction:50 - current autocommit status: true 16:23:09,968 DEBUG JDBCTransaction:52 - disabling autocommit 16:23:10,640 DEBUG SQL:324 - select studypacka0_.study_package_id as study1_, studypacka0_.name as name12_, studypacka0_.description as descript3_12_, ....... from _3AT_package studypacka0_ Hibernate: select studypacka0_.study_package_id as study1_, studypacka0_.name as name12_, studypacka0_.description as descript3_12_, studypacka0_.day as day12_, studypacka0_.sat_timing as sat5_12_, studypacka0_.sat_subjects as sat6_12_, ....... 16:23:10,734 DEBUG JDBCTransaction:83 - commit 16:23:10,796 DEBUG SQL:324 - update _3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=? Hibernate: update _3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=? 16:23:10,812 DEBUG SQL:324 - update _3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=? Hibernate: update _3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=? 16:23:10,812 DEBUG SQL:324 - update _3AT_package set name=?, description=?, ................................... 16:23:10,953 DEBUG JDBCTransaction:173 - re-enabling autocommit 16:23:10,953 DEBUG JDBCTransaction:96 - committed JDBC Connection as you can see, it does update and changed table field values to this: package_id, name, sat_timing, sat_subjects, sun_timing, sun_subjects 1 no.1 business law 2 no.2 business law ---------- all tiimings are gone. and now if i re-do the same query, there are NO UPDATE operations....howver if i add some values to sat_timing, sun_timing, and re-do the query, very surprisingly, i saw those update operations which delete all timing values again! im totally lost... i havent changed any config, this doenst happen to my other classes at all but just this one.... any ideas please! even some thought of what may caused this would be great help! thank you! -- View this message in context: http://www.nabble.com/help-pls%2C-very-strange-problem-tf2095717.html#a5776809 Sent from the Hibernate forum at Nabble.com. |
From: Steve E. <ste...@jb...> - 2006-08-11 20:46:51
|
Migration of the Hibernate email lists to their new hosting home is now complete. As of today, automated emails have been fully cut over: JIRA -> hib...@li... SVN -> hib...@li... CruiseControl -> hib...@li... For the past 2 weeks or so I have been monitoring both of the dev lists. As of next week, that will stop and I will only continue to subscribe to hib...@li... The hib...@li... is new and we'll see how it goes. It is supposed to be used for general announcements, release notifications, etc. For example, I intend to send release announcements to both hib...@li... and hib...@li...... Thanks! Steve |
From: <pat...@cn...> - 2006-08-11 20:07:22
|
Je serai absent(e) du 11/08/2006 au 04/09/2006. Je r=E9pondrai =E0 votre message d=E8s mon retour. En cas de besoin contact= er herv=E9 Vigneron, St=E9phane Voltz ou Beno=EEt Faure. Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et e= tabli a l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme a sa destination, toute diffus= ion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, CNP Assur= ances et ses filiales declinent toute responsabilite au titre de ce message, s'il a ete altere, deforme ou falsifie. ***** This message and any attachments (the "message") are confidential and inten= ded solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither CNP Assurances nor any of its subsidiaries or affiliates shall be l= iable for the message if altered, changed or falsified. |
From: Darryl M. <dar...@ne...> - 2006-08-11 15:13:20
|
Steve Ebersole wrote: > StatelessSession has nothing to do with lack of a transaction! > > - meaning StatelessSession operates in a transaction exactly as does > Session... Ok I must have misunderstood its purpose (it being the StatelessSession), with its use for bulk operations that have no transaction or coherency requirements outside of the currently executing instruction. Darryl |
From: Steve E. <ste...@jb...> - 2006-08-11 13:53:23
|
StatelessSession has nothing to do with lack of a transaction! - meaning StatelessSession operates in a transaction exactly as does Session... -----Original Message----- From: Darryl Miles [mailto:dar...@ne...]=20 Sent: Friday, August 11, 2006 3:13 AM To: Steve Ebersole Cc: hib...@li... Subject: Re: [Hibernate] Session.replicate() into IDENTITY table ? Steve Ebersole wrote: > Not sure if anyone replied to this yet or not, so I'll throw my $0.02 > into the discussion. I think all that is needed is to better allow > definition of what is to occur during replication in the method call. > For example, consider the changing the signature from accepting a > ReplicationMode to accepting a (new) "ReplicationStrategy", where > ReplicationStrategy is defined something like: > ReplicationStrategy { > /** > * How should we react when we encounter a pre-existing row > * in the target database? > * <p/> > * TODO: probably rename the ReplicationMode class to MergeMode > */ > public ReplicationMode getMergeMode() ...=20 > /** > * When replicating an entity which does not yet occur in the > * target database, should we enforce that the target data > * we are about to create have the same identifier value? > */ > public boolean forceIdentiferRetention() ... > } >=20 > Also, there has been some discussion about moving the replicate > functionality from the Session interface to the StatelessSession > interface which would be a good point in time to introduce such changes. The use of a strategy configuration object would fine from the Hibernate API users perspective and head off the possibility of legacy API kruft=20 issues (when another parameter is wanted in the future). Would I be correct in saying that operations using a StatelessSession=20 are not part of a transaction ? If so are you proposing to _REMOVE_ the Session#replicate() operation completely that is part of a transaction.=20 Providing for both stateful and stateless would cover all bases and=20 have their valid use cases. Maybe I am misunderstanding something here. Darryl |
From: Steve E. <ste...@jb...> - 2006-08-11 13:52:12
|
StatelessSession has nothing to do with lack of a transaction! -----Original Message----- From: Darryl Miles [mailto:dar...@ne...]=20 Sent: Friday, August 11, 2006 3:13 AM To: Steve Ebersole Cc: hib...@li... Subject: Re: [Hibernate] Session.replicate() into IDENTITY table ? Steve Ebersole wrote: > Not sure if anyone replied to this yet or not, so I'll throw my $0.02 > into the discussion. I think all that is needed is to better allow > definition of what is to occur during replication in the method call. > For example, consider the changing the signature from accepting a > ReplicationMode to accepting a (new) "ReplicationStrategy", where > ReplicationStrategy is defined something like: > ReplicationStrategy { > /** > * How should we react when we encounter a pre-existing row > * in the target database? > * <p/> > * TODO: probably rename the ReplicationMode class to MergeMode > */ > public ReplicationMode getMergeMode() ...=20 > /** > * When replicating an entity which does not yet occur in the > * target database, should we enforce that the target data > * we are about to create have the same identifier value? > */ > public boolean forceIdentiferRetention() ... > } >=20 > Also, there has been some discussion about moving the replicate > functionality from the Session interface to the StatelessSession > interface which would be a good point in time to introduce such changes. The use of a strategy configuration object would fine from the Hibernate API users perspective and head off the possibility of legacy API kruft=20 issues (when another parameter is wanted in the future). Would I be correct in saying that operations using a StatelessSession=20 are not part of a transaction ? If so are you proposing to _REMOVE_ the Session#replicate() operation completely that is part of a transaction.=20 Providing for both stateful and stateless would cover all bases and=20 have their valid use cases. Maybe I am misunderstanding something here. Darryl |
From: Darryl M. <dar...@ne...> - 2006-08-11 08:12:58
|
Steve Ebersole wrote: > Not sure if anyone replied to this yet or not, so I'll throw my $0.02 > into the discussion. I think all that is needed is to better allow > definition of what is to occur during replication in the method call. > For example, consider the changing the signature from accepting a > ReplicationMode to accepting a (new) "ReplicationStrategy", where > ReplicationStrategy is defined something like: > ReplicationStrategy { > /** > * How should we react when we encounter a pre-existing row > * in the target database? > * <p/> > * TODO: probably rename the ReplicationMode class to MergeMode > */ > public ReplicationMode getMergeMode() ... > /** > * When replicating an entity which does not yet occur in the > * target database, should we enforce that the target data > * we are about to create have the same identifier value? > */ > public boolean forceIdentiferRetention() ... > } > > Also, there has been some discussion about moving the replicate > functionality from the Session interface to the StatelessSession > interface which would be a good point in time to introduce such changes. The use of a strategy configuration object would fine from the Hibernate API users perspective and head off the possibility of legacy API kruft issues (when another parameter is wanted in the future). Would I be correct in saying that operations using a StatelessSession are not part of a transaction ? If so are you proposing to _REMOVE_ the Session#replicate() operation completely that is part of a transaction. Providing for both stateful and stateless would cover all bases and have their valid use cases. Maybe I am misunderstanding something here. Darryl |
From: Emmanuel B. <emm...@hi...> - 2006-08-10 14:42:51
|
You are correct http://opensource.atlassian.com/projects/hibernate/browse/ANN-411 Thanks for having catch up that. Willem Voogd wrote: > > Hi All, > > I'm very new to hibernate and am using annotations for about a week now, > but i believe i stumbled upon some strange behaviour. > If i'm totally out of line and in the wrong place for my findings, > please tell me and I won't cause any more spam on this list :) > > I've got a property annotated as follows: > > @Generated(GenerationTime.INSERT) > @Column(insertable=false) > > Now reading the documentation, i was let to believe this property should > show up in the sqlUpdateStrings, but it didn't. > > So, looking at the internal hibernate-annotations code i saw this code > in PropertyBinder.make(): (It's hibernate-annotations-3.2.0cr1) > > if (generated != null) { > if ( ! GenerationTime.NEVER.equals( generated ) ) { > if ( property.isAnnotationPresent( > javax.persistence.Version.class ) > && GenerationTime.INSERT.equals( generated ) ) { > throw new AnnotationException("@Generated(INSERT) on > a @Version property not allowed, use ALWAYS: " > + StringHelper.qualify( holder.getPath(), > name ) ); > } > if ( prop.isInsertable() ) { > throw new AnnotationException("Cannot have > @Generated property and insertable columns: " > + StringHelper.qualify( holder.getPath(), > name ) ); > } > if ( GenerationTime.ALWAYS.equals( generated ) && > prop.isUpdateable() ) { > throw new AnnotationException("Cannot have > @Generated(ALWAYS) property and updatable columns: " > + StringHelper.qualify( holder.getPath(), > name ) ); > } > prop.setInsertable( false ); > prop.setUpdateable( false ); > prop.setGeneration( PropertyGeneration.parse( > generated.toString().toLowerCase() ) ); > } > } > > > now, why are the calls to prop.setInsertable( false ) and > prop.setUpdateable( false ) happening? It seems rather strange since > they are checked before to see whether or not they are in conflict with > the set GenerationTime, but then are overruled, so that the property > will be neither insertable nor updateable. By commenting out these > calls, the expected behaviour took placed (at least, expected by me) in > that the property showed up in the update string, but not in the insert > string. Also the other properties which had GenerationTime.ALWAYS (and > corresponding column settings) did not show up in neither the insert nor > the update string. > > So am I right in the conclusion that these calls shouldn't be made (and > therefor posting to this list was A Good Thing;)? > > cheers, > > Willem Voogd > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |
From: Willem V. <w.f...@pl...> - 2006-08-10 08:56:50
|
Hi All, I'm very new to hibernate and am using annotations for about a week now, but i believe i stumbled upon some strange behaviour. If i'm totally out of line and in the wrong place for my findings, please tell me and I won't cause any more spam on this list :) I've got a property annotated as follows: @Generated(GenerationTime.INSERT) @Column(insertable=false) Now reading the documentation, i was let to believe this property should show up in the sqlUpdateStrings, but it didn't. So, looking at the internal hibernate-annotations code i saw this code in PropertyBinder.make(): (It's hibernate-annotations-3.2.0cr1) if (generated != null) { if ( ! GenerationTime.NEVER.equals( generated ) ) { if ( property.isAnnotationPresent( javax.persistence.Version.class ) && GenerationTime.INSERT.equals( generated ) ) { throw new AnnotationException("@Generated(INSERT) on a @Version property not allowed, use ALWAYS: " + StringHelper.qualify( holder.getPath(), name ) ); } if ( prop.isInsertable() ) { throw new AnnotationException("Cannot have @Generated property and insertable columns: " + StringHelper.qualify( holder.getPath(), name ) ); } if ( GenerationTime.ALWAYS.equals( generated ) && prop.isUpdateable() ) { throw new AnnotationException("Cannot have @Generated(ALWAYS) property and updatable columns: " + StringHelper.qualify( holder.getPath(), name ) ); } prop.setInsertable( false ); prop.setUpdateable( false ); prop.setGeneration( PropertyGeneration.parse( generated.toString().toLowerCase() ) ); } } now, why are the calls to prop.setInsertable( false ) and prop.setUpdateable( false ) happening? It seems rather strange since they are checked before to see whether or not they are in conflict with the set GenerationTime, but then are overruled, so that the property will be neither insertable nor updateable. By commenting out these calls, the expected behaviour took placed (at least, expected by me) in that the property showed up in the update string, but not in the insert string. Also the other properties which had GenerationTime.ALWAYS (and corresponding column settings) did not show up in neither the insert nor the update string. So am I right in the conclusion that these calls shouldn't be made (and therefor posting to this list was A Good Thing;)? cheers, Willem Voogd |
From: Steve E. <ste...@jb...> - 2006-08-09 11:28:53
|
Not sure if anyone replied to this yet or not, so I'll throw my $0.02 into the discussion. I think all that is needed is to better allow definition of what is to occur during replication in the method call. For example, consider the changing the signature from accepting a ReplicationMode to accepting a (new) "ReplicationStrategy", where ReplicationStrategy is defined something like: ReplicationStrategy { /** * How should we react when we encounter a pre-existing row * in the target database? * <p/> * TODO: probably rename the ReplicationMode class to MergeMode */ public ReplicationMode getMergeMode() ...=20 /** * When replicating an entity which does not yet occur in the * target database, should we enforce that the target data * we are about to create have the same identifier value? */ public boolean forceIdentiferRetention() ... } Also, there has been some discussion about moving the replicate functionality from the Session interface to the StatelessSession interface which would be a good point in time to introduce such changes. -----Original Message----- From: hib...@li... [mailto:hib...@li...] On Behalf Of Darryl Miles Sent: Tuesday, August 01, 2006 12:47 PM To: hib...@li... Subject: [Hibernate] Session.replicate() into IDENTITY table ? A while ago I highlighted a problem with the differences between the=20 documented API and what Hibernate actually does and I'm seeking to an=20 open discussion about the merits and problems to renaming the current=20 #replicate() function to #replicateOrSave() to better identify what it=20 actually does. This is so that a hole can be left open to implement a real #replicate() function which makes contact guarantees that the primary key / OID will=20 be identical even in IDENTITY tables in the replicated object or=20 otherwise it throws an exception. There should also be a feature=20 enquiry function to allow the API programmer to ask the underlying=20 Hibernate implementation to verify if a replication on identity table=20 will work. This would account for JDBC driver vendors and versions and=20 the realtime SQL database server vendor and version. http://www.mail-archive.com/hib...@li.../msg052 30.html http://forum.hibernate.org/viewtopic.php?t=3D949574&highlight=3D http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Session.html#repl icate(java.lang.Object,%20org.hibernate.ReplicationMode) RFC Darryl ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Stefan F. <ste...@we...> - 2006-08-08 15:34:54
|
Hi, I am jumping in lately but the discussion about a new ANTLR translator is very interesting to me. > The first aspect was previously discussed on this list, so I won't go > into all the gory details. Basically, the current Antlr-based > translator translates an HQL query in 3 phases where each phase is > represented by one of the grammars. As part of the refactoring, it was > decided to move to a 4 phase approach. Will that help to fix Bug 960 http://opensource.atlassian.com/projects/hibernate/browse/HHH-960 ? I am not very experienced in the hibernate code but as far as I understand it the bug seems to fit perfectly in that region of code. Maybe someone could respond to this bug and tell - whether the bug is valid and if not why that's the case - how to workaround it - when there will be resources to tackle it That would be super. Thanks a lot in advance, Stefan Fleiter |
From: hv @ F. C. <in...@fa...> - 2006-08-07 18:40:38
|
So you are saying that webapp developers should ask the following to a Servlet/Filter/Listener destroy function ? LogFactory.release(getClass().getClassLoader()); "Simon Kitching" <ski...@ap...> skrev i en meddelelse news:1122514521.3963.99.camel@localhost.localdomain... > Hi Adrian, > > On Wed, 2005-07-27 at 20:15 -0400, Adrian Brock wrote: >> On Wed, 2005-07-27 at 19:43, Simon Kitching wrote: >> > I feel that it is simply unacceptable to drop thirdparty libraries that >> > have never expected to be "container extensions" into the container's >> > classpath? >> >> So aren't you just saying don't use commons-logging in infrastructure >> software unless you can isolate that part of the infrastruture >> from sharing any classes with the rest of the server? >> i.e. don't use it an application server like Tomcat/JBoss > > Not at all. I'm saying that any code deployed into the container's > classpath should be container-aware or that the container should be > aware of it or both. > > Tomcat uses commons-logging, and that's fine because Tomcat ensures that > it cleans up commons-logging when an app is undeployed (see > org.apache.catalina.loader.WebappClassLoader). [1] > > If jboss wants to use Hibernate as part of the container, and Hibernate > uses commons-logging then that's fine: but the container needs to take > that into account by ensuring LogFactory.release is called on undeploy. > Yes it would be nice if this wasn't necessary but as I described earlier > neither java nor j2ee provide *any* mechanism for arbitrary code in the > container's classpath to associated resources with a component > ("application context") so commons-logging can't easily do this itself. > > But I think people should *not* expect that they can grab any random > open-source library from the internet, drop it into the container's > classpath and expect things to work properly. Such libraries should go > into the component's WEB-INF/lib unless they are explicitly declared to > be "container extensions". NB: this includes dropping hibernate into the > container classpath of some arbitrary container framework (j2ee or > otherwise). > > Commons-logging only qualifies as a valid "container extension" when the > container ensures that LogFactory.release is called on webapp undeploy. > > One interesting problem with many libraries that use logging is that > they do this: > public class Foo { > private static final Logger log = Logger.getLogger("somecategory"); > } > The problem occurs if the getLogger method uses the TCCL to determine > what Log object to return. In the case of log4j, if the Context > Repository Selector is configured for log4j then this problem occurs. > Commons-logging has the same limitation. > > When such code is in a component's classpath everything is fine. But > when such code is placed into the container's classpath the *first* > component to call it determines what Log object is returned, then when > other components call into that code in the shared classpath the wrong > logger gets used. Again it's back to that static caching issue: using > statics is fine when the class is deployed *via the component* but wrong > when the class is deployed via a shared classloader. > > [1] I noticed another interesting little bit of code in tomcat;s > WebappClassLoader.stop method: > // Clear the classloader reference in common-logging > org.apache.commons.logging.LogFactory.release(this); > // Clear the classloader reference in the VM's bean introspector > java.beans.Introspector.flushCaches(); > The introspector class caches stuff at a global level?? eek! Again this > would be a very nice case for attaching such cached info to a specific > classloader to avoid these kinds of bidirectional links... > >> >> I personally don't like this argument. It would lead to 100 applications >> with 100 copies of Xerces (lots of memory footprint) just in case >> it had a memory leak. > > Well, xml parsing is part of the j2ee spec so this is a different issue > from people tossing any old library into the classpath. > > But if a container bundles xerces then I would expect the container > provider to read the xerces documentation to make sure xerces is known > to be safe in such an environment and that there is nothing extra that > xerces requires in order to run correctly in that setup. As it happens, > I don't know of any such issues but I don't think such assumptions > should be made. See the java.beans.Introspector note above! > > >> And those "applications" in the case of infrastructure couldn't pass >> DOM objects around without serializing/deserializing them. > > Sorry, I don't follow this one. As mentioned above, j2ee servers provide > xml parsers by definition so apps don't (and shouldn't) bundle them. > > Are you perhaps talking about some scenario where: > * there is an interface I1 defined in a shared classpath > * app1 creates a concrete instance of interface I1, using a class > loaded from the local path > * app1 then performs a JNDI lookup or similar to get a reference to > some method of an object residing in app2 in the same JVM, > where that method takes an I1 as a parameter > * app1 then calls that external object passing its local instance > * app2 then caches a reference to the parameter > * app1 then leaks on deploy because app2 has a reference to an object > which has a class loaded from app1's classloader thereby retaining > app1's classloader including all the other classes. > > You know far more about j2ee than I do, so I'll let you tell me whether > this is a common scenario. Certainly ensuring that the implementation of > I1 is in the container's path rather than in the component's path would > solve this. But that whole setup sounds dodgy to me, and rather > unlikely. And pushing up the shared implementation classes into a common > classloader feels more like a workaround for a broken design than a > valid architecture. > > But if this *is* a common usage scenario then I agree I would have to > rethink my posting. > >> >> Hopefully, these problems will go away in JSE7 with a better >> definition of java modularization: >> http://www.jcp.org/en/jsr/detail?id=277 >> > > Hmm..interesting. Thanks for the link. > > Regards, > > Simon > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September > 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf |
From: Moos A. <adr...@el...> - 2006-08-07 16:52:46
|
Hi, > How do you ensure isolation of changes ? It is the responsibility of the user to create exactly on IdentityFixer = for each context he wants isolated. (We use this to consolidate the = client side data model in a GUI, where there is one context per = application). Did that answer your question? Adrian |
From: Max R. A. <max...@jb...> - 2006-08-07 16:40:51
|
You never stopped to think that seperate identity of objects is actually a *good* thing when you have concurrent threads or multiple unit-of-work ? How do you ensure isolation of changes ? /max > Hi list, > > A couple of weeks ago I posted the first draft version of an interceptor > capable of fixing object identity lost by using multiple sessions and/or > remoting. > > We have substantially improved it in the meantime, and would like to > enter beta testing. > > For further information please refer to the attached document. > > <<IdentityFixer.announcement.pdf>> > Kind regards > Adrian Moos > > PS: This software was developed for ELCA's application framework EL4J, > which is released under the GPL, so you're welcome to use it. -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss Inc max...@jb... |
From: Max R. A. <max...@jb...> - 2006-08-04 07:37:57
|
Hi guys, In case you did not notice then the nightly builds are now reporting actual failing testcases (e.g. *FailureExpected is excluded). Thus they should actually start passing, but they don't. So either we have alot of failing code for e.g. mysql or some more db-specific skipping has to be done (in case of the db actually not supporting the constructs being tested) -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss Inc max...@jb... |
From: Darryl M. <dar...@ne...> - 2006-08-03 11:41:06
|
Peter M.Chen wrote: > a real business project often contains 100 or more persistent class, > now hibernate startup is very slow, normally spent 30 or more seconds. > > So I write a module to speed up it, > only cache the config file path(.hbm.xml) of the persistent class, > read and parse the file content until program using the persistent class. > > http://sourceforge.net/projects/hbn-dyn-mod/ I'm interested in speeding things up. Maybe you would be so kind as to post a brief summary here and on the sourceforge site explaining what it does and how it works. Things I have tried to varying degrees of success: * Buy faster hardware :) * Make use of cachable hbm.xml files in projects that have the hbm.xml file in the WEB-INF/classes directory, but sometime this is not possible as hbm.xml are inside JARs. * Make web-app ServletContextListener.contextInitialized() create a background thread which creates the SessionFactory and once ready it calls a notify callback chain to kickstart Session users. * Use a separate web-app to build and keep the SessionFactory, so that the web-app you are developing can be reloaded independently. This is a little like JBoss AS hbm service (forgotten what its called) but for Tomcat. Darryl |
From: Max R. A. <max...@jb...> - 2006-08-03 07:10:46
|
user questions should be asked on the user forum for forum.hibernate.org= /max > > i am using Dynamic-update property in the mapping file of hibernate so= = > that > only the required columns are updated, but when i look at the log, all= = > the > columns are being updated, where as only the modifed should have been > updated as per meant by the use of Dynamic-update property. Can any on= e = > tell > me why the Dynamic -update property is not working. Any help would be > appreciated. > > This is the Mapping file. > > -------------------------------------------- Mapping File > -------------------------------------------- > <?xml version=3D"1.0"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > > <hibernate-mapping> > <class > name=3D"dao.Person" > dynamic-insert=3D"true" > dynamic-update=3D"true" > table=3D"HIBERNATE_TEST"> > <id name=3D"id" column=3D"ID" type=3D"long"> > <generator class=3D"increment"> > = > </generator> > </id> > = > > <property column=3D"NAME" name=3D"name" type=3D"string"/> > <property column=3D"AGE" name=3D"age" type=3D"string"/> > <property column=3D"SCHOOL" name=3D"School" type=3D"string"/> > <property column=3D"COLLEGE" name=3D"College" type=3D"string"/> > </class> > </hibernate-mapping> > > ----------------------------------------------------------------------= ---------------------------------------- > > -- = -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss Inc max...@jb... |
From: shoaib_sham <sho...@ya...> - 2006-08-03 06:58:01
|
i am using Dynamic-update property in the mapping file of hibernate so that only the required columns are updated, but when i look at the log, all the columns are being updated, where as only the modifed should have been updated as per meant by the use of Dynamic-update property. Can any one tell me why the Dynamic -update property is not working. Any help would be appreciated. This is the Mapping file. -------------------------------------------- Mapping File -------------------------------------------- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="dao.Person" dynamic-insert="true" dynamic-update="true" table="HIBERNATE_TEST"> <id name="id" column="ID" type="long"> <generator class="increment"> </generator> </id> <property column="NAME" name="name" type="string"/> <property column="AGE" name="age" type="string"/> <property column="SCHOOL" name="School" type="string"/> <property column="COLLEGE" name="College" type="string"/> </class> </hibernate-mapping> -------------------------------------------------------------------------------------------------------------- -- View this message in context: http://www.nabble.com/dynamic-update-property--is-not-working.-tf2043996.html#a5627581 Sent from the Hibernate forum at Nabble.com. |
From: Peter M.C. <pet...@gm...> - 2006-08-03 03:15:00
|
a real business project often contains 100 or more persistent class, now hibernate startup is very slow, normally spent 30 or more seconds. So I write a module to speed up it, only cache the config file path(.hbm.xml) of the persistent class, read and parse the file content until program using the persistent class. http://sourceforge.net/projects/hbn-dyn-mod/ |
From: Max R. A. <max...@jb...> - 2006-08-02 21:37:07
|
ok for me to fix the code in the metadata package too or does it need to stay compatible to the old version ? /max > I don't use them. Will I ever need to integrate them? > core CR3 is incompatible with annotations CR1 already so I guess you can > do the change. > > Max Rydahl Andersen wrote: >> Hi Emmanuel/Steve, >> >> The fix I just did for >> http://opensource.atlassian.com/projects/hibernate/browse/HHH-1963 >> renders >> the inheritedMetas in the SecondPass interface useless. (It is only >> relevant for HbmBinder's Collection secondpass construction anyway. >> >> I tried to remove it but then annotations breaks. >> >> Should we just let it stick around or remove it ? >> >> -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss Inc max...@jb... |
From: Max R. A. <max...@jb...> - 2006-08-02 18:56:17
|
On Wed, 02 Aug 2006 18:47:13 +0200, Emmanuel Bernard <emm...@hi...> wrote: > I don't use them. Will I ever need to integrate them? Maybe, but not via this parameter since it's "behavior" is tied into how hbmBinder process the meta attributes. > core CR3 is incompatible with annotations CR1 already so I guess you can > do the change. Ok - i'll remove it. /max > Max Rydahl Andersen wrote: >> Hi Emmanuel/Steve, >> >> The fix I just did for >> http://opensource.atlassian.com/projects/hibernate/browse/HHH-1963 >> renders >> the inheritedMetas in the SecondPass interface useless. (It is only >> relevant for HbmBinder's Collection secondpass construction anyway. >> >> I tried to remove it but then annotations breaks. >> >> Should we just let it stick around or remove it ? >> >> -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate ma...@hi... http://hibernate.org JBoss Inc max...@jb... |
From: Emmanuel B. <emm...@hi...> - 2006-08-02 16:47:40
|
I don't use them. Will I ever need to integrate them? core CR3 is incompatible with annotations CR1 already so I guess you can do the change. Max Rydahl Andersen wrote: > Hi Emmanuel/Steve, > > The fix I just did for > http://opensource.atlassian.com/projects/hibernate/browse/HHH-1963 renders > the inheritedMetas in the SecondPass interface useless. (It is only > relevant for HbmBinder's Collection secondpass construction anyway. > > I tried to remove it but then annotations breaks. > > Should we just let it stick around or remove it ? > > |