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: Matthew E. P. <ma...@li...> - 2003-01-03 22:53:03
|
Sorry if this has already been mentioned or solved, but can anyone help with the problem mentioned in this post: http://sourceforge.net/forum/forum.php?thread_id=787617&forum_id=128638 Thanks! -matthew porter |
From: Juozas B. <ba...@ce...> - 2003-01-03 22:11:11
|
Try DBCPConnectionProvider. ----- Original Message ----- From: "Jim Downing" <jim...@po...> To: <hib...@li...> Sent: Friday, January 03, 2003 10:24 PM Subject: [Hibernate] Postgres problem - idle in transaction. > Hi all, > > I have a problem with hibernate and postgresql that I suspect might be > related to Matt Raible's Oracle problems. Every time hibernate does > it's stuff to update the database, postgres spawns another "idle in > transaction" process. Eventually it gives up and the driver throws: - > > Backend start-up failed: FATAL 1: Sorry, too many clients already > > at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Con nection.java:306) > at org.postgresql.Driver.connect(Driver.java:122) > at java.sql.DriverManager.getConnection(DriverManager.java:512) > at java.sql.DriverManager.getConnection(DriverManager.java:140) > at cirrus.hibernate.connection.DriverManagerConnectionProvider.getConnection(Dr iverManagerConnectionProvider.java:81) > > An example of my code: - > > <pre> > Session hibSess = null; > Transaction tx = null; > > try > { > hibSess = getHibernateSessionFactory().openSession(); > tx = hibSess.beginTransaction(); > > Survey survey = null; > > try > { > survey = (Survey) hibSess.load(Survey.class, id); > } > catch(ObjectNotFoundException e) > { > survey = new Survey(); > [5~ hibSess.save(survey, id); > } > log.info("Setting form survey to "+ survey); > > sform.setSurvey(survey); > > log.info("Committing transaction"); > tx.commit(); > log.info("Committed transaction"); > hibSess.close(); > } > catch(HibernateException e) > { > ... > </pre> > > And hibernate.properties reads: - > > hibernate.connection.driver_class=org.postgresql.Driver > hibernate.connection.url=jdbc:postgresql://localhost:5432/survey > hibernate.connection.username=XXX > hibernate.connection.password=XXX > hibernate.dialect=cirrus.hibernate.sql.PostgreSQLDialect > > Any ideas gratefully received - is this standard behaviour for > hibernate? Do I need to reconfigure postgres to cope? > > thanks, > > jim > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Schnitzer, J. <JSc...@ma...> - 2003-01-03 21:59:51
|
Why not HibernateException extends SQLException? Jeff > -----Original Message----- > From: One Ovthafew [mailto:1ov...@mb...] > Sent: Friday, January 03, 2003 8:30 AM > To: hib...@li... > Subject: Re: [Hibernate] Suggestion: Encapsulate SQLException in > HibernateException >=20 > I am happy to introduce a JDBCException that wraps any SQLExceptions > that occur. However, I don't have a strong view either way. So lets just > vote on this.... >=20 > Gavin >=20 > >> I was thinking about wrapping SQLException in HibernateException, so > that we don't need to worry about catch HibernateException and > SQLException. Since now the work is focused on some changes for > Hibernate 2, this could be the right time to do this kind of change. > This would simplify the error handling in the applications. << >=20 > --------------------------------------------------------------------- > Never lose a fax again, receive faxes to your personal email account! > Visit http://www.mbox.com.au/fax >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Max R. A. <ma...@eo...> - 2003-01-03 21:38:34
|
How much back-wards compability should there be for hibernate-1.1 dtd in hbm2java ? (Here thinking on the recent 'role to name' name change)... Just wanting to hear the general opinion ? (Im +1 on having hbm2java only support hibernate-2.0.dtd) /max |
From: Ugo C. <u....@cb...> - 2003-01-03 21:10:22
|
Gavin King wrote: > Ugo, would you please produce a page documenting your approach to this > for the Wiki. Other people will also need to know this stuff. Done. I also hope I can find the time to write some reusable code that spares me from having to do all this every single time I want to store a Clob. If I succeed, I will donate it, if anyone's interested. Ugo |
From: Max R. A. <ma...@eo...> - 2003-01-03 20:53:19
|
> Well, by the looks of your code, you aren't *actually* passing in a List > of Longs....it looks like you're passing instances of Headend. If you > pass a List of java.lang.Long I would expect it to work. > > Alternatively you could use: > > q.setParameterList( > "id_list", > headends, // a list of Headend instances > Hibernate.association(Headend.class) // the Hibernate Type for Headend > ); Hey, what happens here :) I can't remember to have seen this "idiom" before...what does it do ? :) (I've never seen/used Hibernate.association before...what is it's purpose ? And why is it named association when it returns "entity" types for a given class ?... /max |
From: Max R. A. <ma...@eo...> - 2003-01-03 20:31:43
|
----- Original Message ----- From: "Aslak Hellesoy" <asl...@ne...> To: "One Ovthafew" <1ov...@mb...>; <hib...@li...> Sent: Friday, January 03, 2003 6:10 PM Subject: RE: [Hibernate] Middlegen and XDoclet marriage > > > >>>>>>>XDoclet>>>>>> >>>SchemaExport>>>> > > java + @tags hbm.xml SQL DDL > > <<<CodeGenerator<<<< <<<<<Middlegen<<<<< > > > > Oh, the beauty! Before I saw Gavin's beautifull drawing I also viewed both approaches as legitimate. But I wanted BOTH possibilities, because of two things: 1. I like the codegenerator and the hbm.xml -> java approach 2. I like XDoclet and saw the ability to provide an java+@tags approach for the beginner and intermediate user would be GREAT :) But with the beautifuly drawing I saw symmetry (which is good :) The only real "issue" is that if you are doing Middlegen->hbm.xml->java@tags with the purpose of using the java@tags version to do java@tags->hbm.xml, then it seems rather "redundant".... but then again, the XDoclet generation in the code generator would ofcourse be optional....hey, i got to think....with my local version of hbm2java (which the codegenerator is called now :) we got the <meta attribute="description"></meta>, which is an ideal place for MiddleGen to place it's "additional" XDoclet tags...if that is in any way advantageous... /max > > > > > The the only leg of the roundtripping that is not > > fully reproduceable without user interaction is the > > DDL -> hbm.xml (ie. Middlegen) step. > > > > Middlegen can indeed be run without user interaction. Just say gui="false" > to the middlegen task. If you run it without the gui, it will use defaults > or look at the preferences file (which will exist if Middlegen has been run > previously). > > http://boss.bekk.no/boss/middlegen/ant/index.html#gui > http://boss.bekk.no/boss/middlegen/ant/index.html#prefsdir > > Aslak > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |
From: Jim D. <jim...@po...> - 2003-01-03 20:24:13
|
Hi all, I have a problem with hibernate and postgresql that I suspect might be related to Matt Raible's Oracle problems. Every time hibernate does it's stuff to update the database, postgres spawns another "idle in transaction" process. Eventually it gives up and the driver throws: - Backend start-up failed: FATAL 1: Sorry, too many clients already at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:306) at org.postgresql.Driver.connect(Driver.java:122) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at cirrus.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:81) An example of my code: - <pre> Session hibSess = null; Transaction tx = null; try { hibSess = getHibernateSessionFactory().openSession(); tx = hibSess.beginTransaction(); Survey survey = null; try { survey = (Survey) hibSess.load(Survey.class, id); } catch(ObjectNotFoundException e) { survey = new Survey(); [5~ hibSess.save(survey, id); } log.info("Setting form survey to "+ survey); sform.setSurvey(survey); log.info("Committing transaction"); tx.commit(); log.info("Committed transaction"); hibSess.close(); } catch(HibernateException e) { ... </pre> And hibernate.properties reads: - hibernate.connection.driver_class=org.postgresql.Driver hibernate.connection.url=jdbc:postgresql://localhost:5432/survey hibernate.connection.username=XXX hibernate.connection.password=XXX hibernate.dialect=cirrus.hibernate.sql.PostgreSQLDialect Any ideas gratefully received - is this standard behaviour for hibernate? Do I need to reconfigure postgres to cope? thanks, jim |
From: Max R. A. <ma...@eo...> - 2003-01-03 20:21:35
|
Im approx +0 on this one :) Gavin, why was this done in the first place ? Seem to remember somewhere that the docs states: Free from my mind: "Hibernate does not hide what's happening. e.g. SQLExceptions is propagated all the way up to the user." . /max ----- Original Message ----- From: "One Ovthafew" <1ov...@mb...> To: <hib...@li...> Sent: Friday, January 03, 2003 5:29 PM Subject: Re: [Hibernate] Suggestion: Encapsulate SQLException in HibernateException > I am happy to introduce a JDBCException that wraps any SQLExceptions > that occur. However, I don't have a strong view either way. So lets just > vote on this.... > > Gavin > > >> I was thinking about wrapping SQLException in HibernateException, so > that we don't need to worry about catch HibernateException and > SQLException. Since now the work is focused on some changes for > Hibernate 2, this could be the right time to do this kind of change. > This would simplify the error handling in the applications. << > > --------------------------------------------------------------------- > Never lose a fax again, receive faxes to your personal email account! > Visit http://www.mbox.com.au/fax > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |
From: Max R. A. <ma...@eo...> - 2003-01-03 20:15:48
|
> * Remove the exception that occurs if you save an object > that is already associated with the session. This > makes save() consistent with saveOrUpdate(). >Lets make this change. > * Remove the exception that occurs if you delete an object > that is already deleted in that session. >Lets make this change also (for consistency). Max, I don't see >much value in making this configurable. We don't want to spawn >millions of config properties for minor issues like these. <snif> ;( bummer.... The methods will still throw an exception if I delete/save the same entity with two different instances, or ? e.g. Person p1 = s1.load(Person.class, 42); Person p2 = s2.load(Person.class, 42); // P1 and P2 are same entity, but two different instances s1.delete(p1); s1.delete(p1); // will now not throw an exception s1.delete(p2); // would be nice if it blew.... (and the same for save()) That would ensure that I can still be "notified" if someone has "screwed" up their save/delete sequence... /max |
From: Raible, M. <Mat...@ca...> - 2003-01-03 20:07:18
|
And so it begins - I eliminated about 100 lines of code by passing in a List of longs, vs. a List of objects with their id's set. Thank you from the bottom of my heart ;) Matt ------------- Forwarded message ------------- > This *looks* to be exactly what I'm looking for, however, I'm getting an > "inconsistent datatypes" error from Oracle. Is there something I need to do > to get :id_list to be recognized as Longs? Well, by the looks of your code, you aren't *actually* passing in a List of Longs....it looks like you're passing instances of Headend. If you pass a List of java.lang.Long I would expect it to work. Alternatively you could use: q.setParameterList( "id_list", headends, // a list of Headend instances Hibernate.association(Headend.class) // the Hibernate Type for Headend ); Gavin --------------------------------------------------------------------- Never lose a fax again, receive faxes to your personal email account! Visit http://www.mbox.com.au/fax ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel -- Matt Raible, Raible Designs, Morrison CO US -- Tel: +1 303 979-5340 -- Mob: +1 720 560-8460 -- Fax: +1 508 256-6471 -- Web: http://www.raibledesigns.com |
From: SourceForge.net <no...@so...> - 2003-01-03 18:02:27
|
Patches item #661753, was opened at 2003-01-03 10:03 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=661753&group_id=40712 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Benoit Menendez (bmenendez) Assigned to: Nobody/Anonymous (nobody) Summary: Could you please add... Initial Comment: The readonly attribute to the map element in the DTD. This is necessary for bidirectional map. Thanks. <!ATTLIST map readonly (true|false) "false"> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=661753&group_id=40712 |
From: SourceForge.net <no...@so...> - 2003-01-03 17:55:35
|
Patches item #661750, was opened at 2003-01-03 09:56 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=661750&group_id=40712 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Benoit Menendez (bmenendez) Assigned to: Nobody/Anonymous (nobody) Summary: Table.uniqueColumnString Initial Comment: Would it be more appropriate to do: public String uniqueColumnString(Iterator iterator) { int result = name.hashCode(); while ( iterator.hasNext() ) result += iterator.next ().hashCode(); return Integer.toHexString(result).toUpperCase(); } instead of public String uniqueColumnString(Iterator iterator) { int result = 0; while ( iterator.hasNext() ) result += iterator.next ().hashCode(); return ( Integer.toHexString( name.hashCode() ) + Integer.toHexString(result) ).toUpperCase(); } This would generate shorter names ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=661750&group_id=40712 |
From: Juozas B. <ba...@ce...> - 2003-01-03 17:53:06
|
postgres closes connection if it detects error in protocol, something like this can produce this error: char c = '\u0000'; String query = "select " + c; statement.execute(query);// error not detected by driver, server closes connection; I am not sure about all driver versions, but it must be possible to reproduce on most of them. ----- Original Message ----- From: "cheeser" <hib...@ch...> To: <hib...@li...> Sent: Friday, January 03, 2003 5:40 AM Subject: [Hibernate] saving to pgsql I'm having troubles getting my objects to persist. In my pgsql.err, i get error messages about "unexpected EOF on client connection." Has anyone seen this? I create the bean and call session.save() with it. When I'm done with the session, I call flush() and close() (trying to force it) and nothing gets saved. Here's part of my hibernate.xml: <class name="org.cheeseronline.antfarm.system.CommentBean" table="CommentTable" discriminator-value="Comment"> <id name="PrimaryKey"> <generator class="cirrus.hibernate.id.HiLoGenerator"> <param>uid_table</param> <param>next_hi_value_column</param> </generator> </id> <discriminator column="subclass" type="string"/> <property name="Text" type="string" column="Value"/> <property name="DateEntered" type="date"/> </class> There are other classes in there, but the code is generated so it all looks the same. Can anyone see what I'm doing wrong? cheeser ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: <asl...@ne...> - 2003-01-03 17:10:43
|
> >>>>>>>XDoclet>>>>>> >>>SchemaExport>>>> > java + @tags hbm.xml SQL DDL > <<<CodeGenerator<<<< <<<<<Middlegen<<<<< > Oh, the beauty! > > The the only leg of the roundtripping that is not > fully reproduceable without user interaction is the > DDL -> hbm.xml (ie. Middlegen) step. > Middlegen can indeed be run without user interaction. Just say gui="false" to the middlegen task. If you run it without the gui, it will use defaults or look at the preferences file (which will exist if Middlegen has been run previously). http://boss.bekk.no/boss/middlegen/ant/index.html#gui http://boss.bekk.no/boss/middlegen/ant/index.html#prefsdir Aslak |
From: Konstantin P. <kpr...@ya...> - 2003-01-03 17:02:18
|
--- One Ovthafew <1ov...@mb...> wrote: > > We havn't actually had much discussion of middlegen > on > this list (though it has come up a couple of times). > This > recent burst of activity is mainly in response to > the > thinking Max has been doing recently and I'm just > kinda > following up on his ideas. > > I'd particularly like to know what Konstantin thinks > about this stuff, since he is the one currently > working > on the Hibernate XDoclet module and perhaps he has > the > best idea of what its capabilities will be in the > near > future. IMHO, both approaches are legitimate. Middlegen is focused on generating xdoclet marked source files. (Though it can generate almost everything else). Having xdoclet marked java source files has its advantages - xdoclet is not only for mappings, I'm also using it to generate BeanInfo and externalized properties out of my data model classes. I consider hibernate module already usefull, but short of composite IDs ( have still to figure out myself what to generate , and what tags to use - but this is on hibernate message board ) This will be implemented soon. What else? > Now something that occurred to me today is that > *whichever* way we go, either Middlegen template or > Codegenerator, it would be helpful for the generated > source to contain XDoclet tags. (Currently > CodeGenerator > does NOT generate them.) > > However, I am still currently in favor of > simplifying > things to: > > > >>>>>>>XDoclet>>>>>> >>>SchemaExport>>>> > java + @tags hbm.xml SQL DDL > <<<CodeGenerator<<<< <<<<<Middlegen<<<<< > Looks nice... regards, ===== Konstantin Priblouda ( ko5tik ) Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
From: One O. <1ov...@mb...> - 2003-01-03 16:47:41
|
We havn=27t actually had much discussion of middlegen on this list (though it has come up a couple of times)=2E This recent burst of activity is mainly in response to the thinking Max has been doing recently and I=27m just kinda following up on his ideas=2E I=27d particularly like to know what Konstantin thinks about this stuff=2C since he is the one currently working on the Hibernate XDoclet module and perhaps he has the best idea of what its capabilities will be in the near future=2E Now something that occurred to me today is that *whichever* way we go=2C either Middlegen template or = Codegenerator=2C it would be helpful for the generated source to contain XDoclet tags=2E (Currently CodeGenerator does NOT generate them=2E) However=2C I am still currently in favor of simplifying things to=3A =3E=3E=3E=3E=3E=3E=3EXDoclet=3E=3E=3E=3E=3E=3E =3E=3E=3ESchemaE= xport=3E=3E=3E=3E java + =40tags hbm=2Exml SQL DDL =3C=3C=3CCodeGenerator=3C=3C=3C=3C =3C=3C=3C=3C=3CMiddlegen=3C=3C= =3C=3C=3C The the only leg of the roundtripping that is not fully reproduceable without user interaction is the DDL -=3E hbm=2Exml (ie=2E Middlegen) step=2E ----- Original Message ----- = From=3A =22Aslak Helles=F8y=22 =3Caslak=2Ehellesoy=40netcom=2Eno=3E To=3A =3Chibernate-devel=40lists=2Esourceforge=2Enet=3E Sent=3A Saturday=2C January 04=2C 2003 3=3A28 AM Subject=3A =5BHibernate=5D Middlegen and XDoclet marriage =3E Hi! =3E = =3E I=27m new on the Hibernate list=2C so I haven=27t followed your discu= ssions about =3E XDoclet and Middlegen integration lately=2E -But I=27ve seen your Wik= i=2E As some =3E of you probably know already=2C Gavin has developed a Hibernate plugi= n for =3E Middlegen that should work with the recent XDoclet module for Hiberna= te =3E (which is in XDoclet=27s CVS and the recent 1=2E2b2 release)=2E =3E = =3E http=3A//sourceforge=2Enet/tracker/index=2Ephp=3Ffunc=3Ddetail=26aid=3D66= 0628=26group=5Fid=3D360 =3E 44=26atid=3D415992 =3E = =3E This means we=27ll have=3A =3E = =3E RDBMS -- Middlegen --=3E POJOs with =40hibernate tags -- XDoclet --=3E= hbm=2Exml =3E = =3E (POJO =3D Plain Old Java Object =3D simple javabean style class) =3E = =3E So basically you can start with a database=2C do some configurations = in =3E Middlegen=27s GUI=2C and have the java code and hbm=2Exml files gener= ated=2E =3E = =3E Gavin and I have been discussing a different approach though=3A =3E = =3E RDBMS -- Middlegen --=3E hbm=2Exml -- Hibernate=27s CodeGenerator --=3E= POJOs =3E = =3E Both approaches are a mix of bottom-up (you start with a database) + either =3E xml-=3Ejava or java-=3Exml=2E =3E = =3E According to Gavin=2C Hibernate=27s CodeGenerator is more mature than= XDoclet=27s =3E Hibernate module=2E However=2C his current Middlegen plugin advocates= the =3E XDoclet approach (and not the CodeGenerator approach)=2E =3E = =3E So my question is=3A Where do we go from here=3F Which approach do =5F= you=5F prefer=3F =3E (Considering that this Hibernate/XDoclet/Middlegen marriage is still = quite =3E young and untested)=2E =3E = =3E Cheers=2C =3E Aslak (Middlegen and XDoclet committer) =3E = =3E = --------------------------------------------------------------------- Never lose a fax again, receive faxes to your personal email account! Visit http://www.mbox.com.au/fax |
From: One O. <1ov...@mb...> - 2003-01-03 16:33:42
|
I am happy to introduce a JDBCException that wraps any SQLExceptions that occur. However, I don't have a strong view either way. So lets just vote on this.... Gavin >> I was thinking about wrapping SQLException in HibernateException, so that we don't need to worry about catch HibernateException and SQLException. Since now the work is focused on some changes for Hibernate 2, this could be the right time to do this kind of change. This would simplify the error handling in the applications. << --------------------------------------------------------------------- Never lose a fax again, receive faxes to your personal email account! Visit http://www.mbox.com.au/fax |
From: <asl...@ne...> - 2003-01-03 16:28:48
|
Hi! I'm new on the Hibernate list, so I haven't followed your discussions about XDoclet and Middlegen integration lately. -But I've seen your Wiki. As some of you probably know already, Gavin has developed a Hibernate plugin for Middlegen that should work with the recent XDoclet module for Hibernate (which is in XDoclet's CVS and the recent 1.2b2 release). http://sourceforge.net/tracker/index.php?func=detail&aid=660628&group_id=360 44&atid=415992 This means we'll have: RDBMS -- Middlegen --> POJOs with @hibernate tags -- XDoclet --> hbm.xml (POJO = Plain Old Java Object = simple javabean style class) So basically you can start with a database, do some configurations in Middlegen's GUI, and have the java code and hbm.xml files generated. Gavin and I have been discussing a different approach though: RDBMS -- Middlegen --> hbm.xml -- Hibernate's CodeGenerator --> POJOs Both approaches are a mix of bottom-up (you start with a database) + either xml->java or java->xml. According to Gavin, Hibernate's CodeGenerator is more mature than XDoclet's Hibernate module. However, his current Middlegen plugin advocates the XDoclet approach (and not the CodeGenerator approach). So my question is: Where do we go from here? Which approach do _you_ prefer? (Considering that this Hibernate/XDoclet/Middlegen marriage is still quite young and untested). Cheers, Aslak (Middlegen and XDoclet committer) |
From: One O. <1ov...@mb...> - 2003-01-03 16:14:37
|
> This *looks* to be exactly what I'm looking for, however, I'm getting an > "inconsistent datatypes" error from Oracle. Is there something I need to do > to get :id_list to be recognized as Longs? Well, by the looks of your code, you aren't *actually* passing in a List of Longs....it looks like you're passing instances of Headend. If you pass a List of java.lang.Long I would expect it to work. Alternatively you could use: q.setParameterList( "id_list", headends, // a list of Headend instances Hibernate.association(Headend.class) // the Hibernate Type for Headend ); Gavin --------------------------------------------------------------------- Never lose a fax again, receive faxes to your personal email account! Visit http://www.mbox.com.au/fax |
From: Raible, M. <Mat...@ca...> - 2003-01-03 14:57:12
|
This *looks* to be exactly what I'm looking for, however, I'm getting an "inconsistent datatypes" error from Oracle. Is there something I need to do to get :id_list to be recognized as Longs? I tried the query that Hibernate is using, and substituted the test case parameters, and everything worked fine. My DAO method expects a list, and that's what I'm passing in. Here's my method signature: public List getHeadendNames(List headendIds) throws DAOException { Session ses = null; Headend headend = null; List headendList = Collections.synchronizedList(new ArrayList(headendIds.size())); try { ses = HibernateSession.currentSession(); Query q = ses.createQuery("from h in class com.cable.comcast.dmc.itd.cct.persistence.Headend where h.id in (:id_list) order by h.name"); q.setParameterList("id_list", headendIds); List sorted = q.list(); And here's my test to call it: Headend h = new Headend(); h.setId(new Long(2)); headendList.add(h); h = new Headend(); h.setId(new Long(3)); headendList.add(h); List listWithNames = new ArrayList(headendList.size()); listWithNames = dao.getHeadendNames(headendList); Thanks, Matt -----Original Message----- From: Gavin King [mailto:Gav...@ex...] Sent: Thursday, January 02, 2003 7:56 PM To: Raible, Matt; hib...@li... Subject: RE: [Hibernate] Getting a sorted list of results Try something like: Query q = sess.createQuery("from h in class Headend where h.id in (:id_list) order by h.name"); q.setParameterList("id_list", headendIds); List sorted = q.list(); Note that this is might not be very good if the id List is very long... > -----Original Message----- > From: Raible, Matt [mailto:Mat...@ca...] > Sent: Friday, 3 January 2003 11:33 AM > To: 'hib...@li...' > Subject: [Hibernate] Getting a sorted list of results > > > I am using the following method to get back a list of objects > based on ids. What I would prefer is to get back a list of > objects sorted by object.name. I know there's an easier way > to do this with hibernate, but I can't seem to find it. > > // loop through the list of headend ids and get > their names > for (int i = 0; i < headendIds.size(); i++) { > > headend = (Headend) headendIds.get(i); // get the id > > Long headendId = headend.getId(); > if (log.isDebugEnabled()) { > log.debug("looking for headend with id: > " + headendId); > } > headend = (Headend) ses.load(Headend.class, > headendId); // get the headend > > if (headend == null) { > log.error("No headend name found for id: > " + headendId); > throw new DAOException("No headend name > found for id: " > + > headendId); > } else { > if (log.isDebugEnabled()) { > log.debug("returning headend > with name: " + headend); > } > } > > // replace the object in the list > headendList.add(i, headend); > } > > Thanks, > > Matt > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |
From: <rmi...@po...> - 2003-01-03 14:46:29
|
Hi, I was thinking about wrapping SQLException in HibernateException, so that we don't need to worry about catch HibernateException and SQLException. Since now the work is focused on some changes for Hibernate 2, this could be the right time to do this kind of change. This would simplify the error handling in the applications. Robson |
From: <rmi...@po...> - 2003-01-03 14:38:27
|
From: <rmi...@po...> - 2003-01-03 14:38:23
|
From: Konstantin P. <kpr...@ya...> - 2003-01-03 10:24:32
|
> One question, I'm new to JBoss. Should the example > run in a vanilla JBoss > 3.0.4 (with Tomcat) install? I changed the > hibernate.properties before > building and now it deploy's fine. But when I run > the client (run.sh) I get > two errors: 1) cannot fine DefaultDS data source and > 2) no users.properties > found. I have vanilla 3.0.2, without tomcat ( do not need it as my clients are swingy ) > I checked the default hsqldb-service.xml file and > all seems fine - hibernate > and JBoss use the same default userid and password. > > I read a little of the JBoss Getting Started Guide > and browsed their > newsgroups enough to figure out how to setup a > users.properties and > roles.properties file in the JBoss conf directory. > Still no joy, but a > change - I now get: > 20:52:11,973 ERROR [LogInterceptor] EJBException, > causedBy: > java.lang.SecurityException: Authentication > exception, principal=null > > The users.properties file looks like: > guest=guest > guest1= > user1=user1 > admin=admin > unauthenticatedIdentity=guest > and the roles.properties file looks like: > guest=guest,user > guest1=guest > user1=guest,admin,user > admin=guest,admin,user > unauthenticatedIdentity=guest > > I realize this is more of a JBoss problem and its a > newbie problem at that. > But it would be great if the example could work > out-of-the box. Well, in JBoss subtack invocation I specify: unauthenticatedPrincipal="nobody" and on bean: @ejb.permission unchecked="true" You also may adjust securityDomain setting to point to java:/jaas/other ( which is by default therehere is my snippet out of login-config.xml: ---%<------------ <!-- The default login configuration used by any security domain that does not have a application-policy entry with a matching name --> <application-policy name = "other"> <!-- A simple server login module, which can be used when the number of users is relatively small. It uses two properties files: users.properties, which holds users (key) and their password (value). roles.properties, which holds users (key) and a comma-separated list of their roles (value). The unauthenticatedIdentity property defines the name of the principal that will be used when a null username and password are presented as is the case for an unuathenticated web client or MDB. If you want to allow such users to be authenticated add the property, e.g., unauthenticatedIdentity="nobody" --> <authentication> <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required" /> </authentication> </application-policy> <application-policy name = "ukw"> <!-- security policy for ukw application --> <authentication> <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule" flag = "required"> <module-option name = "unauthenticatedIdentity">nobody</module-option> </login-module> </authentication> </application-policy> ----%<--------------- In roles.properties I say : nobody=nobody hope this helps... regards, ===== Konstantin Priblouda ( ko5tik ) Freelance Software developer < http://www.pribluda.de > < play java games -> http://www.yook.de > < render charts online -> http://www.pribluda.de/povray/ > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |