From: Aapo L. <aap...@pr...> - 2002-12-04 19:08:50
|
I have need for global components. Here is example of one: <component name="metadata" class="eg.Metadata"> <property name="createdOn" column="created_on" type="timestamp" unique="false"/> <many-to-one name="createdBy" class="eg.User" column="created_by" unique="false"/> <property name="accepted" column="accepted" type="boolean" unique="false"/> <many-to-one name="acceptedBy" class="eg.User" column="accepted_by" unique="false"/> <property name="archived" column="archived" type="boolean" unique="false"/> <property name="archivedOn" column="archived_on" type="timestamp" unique="false"/> <many-to-one name="archivedBy" class="eg.User" column="archived_by" unique="false"/> <property name="modifiedOn" column="modified_on" type="timestamp" unique="false"/> <many-to-one name="modifiedBy" class="eg.User" column="modified_by" unique="false"/> <property name="deleted" column="deleted" type="boolean" unique="false"/> <property name="deletedOn" column="deleted_on" type="timestamp" unique="false"/> <many-to-one name="deletedBy" class="eg.User" column="deleted_by" unique="false"/> </component> With current implementation I have to copy this definition to all of my mapping files that need to provide metadata. Is there workaround to this? Or is it just me who ever likes to see this kind of functionality? Kind Regards Aapo <b/>ungle Laakkonen |
From: Gavin K. <Gav...@ex...> - 2002-12-05 06:58:36
|
>Okay, I have gone through the Hibernate schema and the=20 >Xdoclet xdt and have I made the changes that I *think*=20 >brings the module in line with changes made for 1.1. I=20 >have attached the xdt and would appreciate if those of=20 >you who are more familiar with these could double check=20 >what I have done. Looks all fine to me! >After I get some feed back on this I will update the unit=20 >test to reflect these changes and make certain everything=20 >actually runs. Then I will commit this stage back to cvs. Go ahead... Thanks heaps Gavin ********** 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: Gavin K. <Gav...@ex...> - 2002-12-20 22:55:09
|
It will happen immediately 1.2.1 is out the door. See my next post. > -----Original Message----- > From: Max Rydahl Andersen [mailto:ma...@eo...]=20 > Sent: Saturday, 21 December 2002 6:19 AM > To: Gavin King > Cc: hibernate list > Subject: Re: [Hibernate] Enhancements to the Hibernate=20 > Xdoclet subtasks >=20 >=20 > Gavin, >=20 > Did anything ever happen concerning moving the source into an=20 > src directory ? >=20 > /max >=20 > ----- Original Message ----- > From: "Gavin King" <ga...@ap...> > To: "Max Rydahl Andersen" <ma...@eo...> > Cc: "hibernate list" <hib...@li...> > Sent: Friday, November 29, 2002 6:36 AM > Subject: Re: [Hibernate] Enhancements to the Hibernate=20 > Xdoclet subtasks >=20 >=20 > > Yeah sure. I will make a support request to SourceForge staff.... > > > > ----- Original Message ----- > > From: "Max Rydahl Andersen" <ma...@eo...> > > To: "Gavin King" <ga...@ap...>; "Joel Rosi-Schwartz"=20 > > <Joe...@Et...> > > Cc: "hibernate list" <hib...@li...> > > Sent: Friday, November 29, 2002 1:25 AM > > Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet=20 > > subtasks > > > > > > > And know when we are on an related subject :) > > > > > > Could we soon be introducing a src directory instead of having=20 > > > cirrus in > > the > > > root of the project ? > > > It would make life much easier for me and my eclipse :) > > > > > > /max > > > > > > ----- Original Message ----- > > > From: "Gavin King" <ga...@ap...> > > > To: "Joel Rosi-Schwartz" <Joe...@Et...> > > > Cc: "hibernate list" <hib...@li...> > > > Sent: Wednesday, November 27, 2002 3:54 PM > > > Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet=20 > > > subtasks > > > > > > > > > > > > > > I'm not too keen on adding .project + .classpath - my=20 > .classpath=20 > > > > has hardcoded pathnames to various JDBC drivers and it=20 > would be a=20 > > > > real > > hassle > > > to > > > > not accidently check those in each time.=20 > (hibernate.properties is=20 > > > > bad enough; up to version 1.91 already.) Anyway, I use Eclipse=20 > > > > very > smoothly > > + > > > > successfully without them there. Note that I use cygwin for CVS=20 > > > > access because I just hate the eclipse CVS client. > > > > > > > > > If this is not a problem, then I would also like an=20 > okay to add > > Eclipse > > > > > project support. It only adds two files, .classpath and=20 > > > > > .project, > and > > > > > these are not intrusive to anyone who is not using=20 > Eclipse. In=20 > > > > > fact > if > > > > > you wanted to give me commit on all of the modules, I=20 > would be=20 > > > > > happy > > to > > > > > set up and maintain Eclipse project support across the board.=20 > > > > > For > > people > > > > > using Eclispe this makes it *much* easier to pull code out of=20 > > > > > cvs > and > > be > > > > > up and running immediately. > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: Get the new Palm Tungsten T=20 > > > > handheld. Power & Color in a compact size!=20 > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > > > > _______________________________________________ > > > > hibernate-devel mailing list=20 > hib...@li... > > > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Get the new Palm Tungsten T > > > handheld. Power & Color in a compact size! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > > > _______________________________________________ > > > hibernate-devel mailing list > > > hib...@li... > > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > >=20 >=20 >=20 > ------------------------------------------------------- > This SF.NET email is sponsored by: The Best Geek Holiday Gifts! > Time is running out! Thinkgeek.com has the coolest gifts for > your favorite geek. Let your fingers do the typing. Visit Now. > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel >=20 ********** 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: Gavin K. <Gav...@ex...> - 2002-12-20 22:59:23
|
I meant to say a big thanks to Joel for his work on this.=20 Actually I intend to remove the Tools module fairly soon,=20 since the XDoclet CVS is now considered the home of=20 Hibernate XDoclet. Gavin -----Original Message----- From: Joel Rosi-Schwartz [mailto:Joe...@Et...]=20 Sent: Saturday, 21 December 2002 9:08 AM To: Max Rydahl Andersen Cc: Gavin King; hibernate list Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks Actually the Hibernate XDoclet module has moved under the umbrella of the XDocklet project proper. Until the next XDoclet release, it is only available by downloading all of XDockle from cvs on Source Forge and building it. I suppose that if that was really inconvenient, one could always download the one from the Hibernate Tools cvs tree, but that no longer has the latest modifications. - joel Max Rydahl Andersen wrote: Gavin, Did anything ever happen concerning moving the source into an src directory ? /max ----- Original Message ----- From: "Gavin King" <ga...@ap...> To: "Max Rydahl Andersen" <ma...@eo...> Cc: "hibernate list" <hib...@li...> Sent: Friday, November 29, 2002 6:36 AM Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks =20 Yeah sure. I will make a support request to SourceForge staff.... ----- Original Message ----- From: "Max Rydahl Andersen" <ma...@eo...> To: "Gavin King" <ga...@ap...>; "Joel Rosi-Schwartz" <Joe...@Et...> Cc: "hibernate list" <hib...@li...> Sent: Friday, November 29, 2002 1:25 AM Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks =20 And know when we are on an related subject :) Could we soon be introducing a src directory instead of having cirrus in =20 the =20 root of the project ? It would make life much easier for me and my eclipse :) /max ----- Original Message ----- From: "Gavin King" <ga...@ap...> To: "Joel Rosi-Schwartz" <Joe...@Et...> Cc: "hibernate list" <hib...@li...> Sent: Wednesday, November 27, 2002 3:54 PM Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks =20 I'm not too keen on adding .project + .classpath - my .classpath has hardcoded pathnames to various JDBC drivers and it would be a real =20 hassle =20 to =20 not accidently check those in each time. (hibernate.properties is bad enough; up to version 1.91 already.) Anyway, I use Eclipse very =20 smoothly =20 + =20 successfully without them there. Note that I use cygwin for CVS access because I just hate the eclipse CVS client. =20 If this is not a problem, then I would also like an okay to add =20 Eclipse =20 project support. It only adds two files, .classpath and .project, =20 and =20 these are not intrusive to anyone who is not using Eclipse. In fact =20 if =20 you wanted to give me commit on all of the modules, I would be happy =20 to =20 set up and maintain Eclipse project support across the board. For =20 people =20 using Eclispe this makes it *much* easier to pull code out of cvs =20 and =20 be =20 up and running immediately. =20 ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel =20 ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel =20 =20 ------------------------------------------------------- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ _______________________________________________ hibernate-devel mailing list hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel =20 ********** 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: Aapo L. <aap...@pr...> - 2002-12-04 20:04:40
|
Here is my settings: <hibernate-configuration> <session-factory name="java:comp/env/jndi/HibernateSessionFactory"> <property name="connection.datasource">java:comp/env/jdbc/xa/postgresql/somedb</pr operty> <property name="dialect">cirrus.hibernate.sql.PostgreSQLDialect</property> ... mapping files ... </session-factory> </hibernate-configuration> hibernate.use_outer_join=true hibernate.show_sql=false hibernate.jdbc.batch_size=10 hibernate.statement_cache.size=20 hibernate.transaction.factory_class=cirrus.hibernate.transaction.JTATran sactionFactory hibernate.transaction.manager_lookup_class=cirrus.hibernate.transaction. ResinTransactionManagerLookup hibernate.query.substitutions yes 'Y', no 'N' jta.UserTransaction=java:comp/UserTransaction I start transaction with this code: Session session = null; cirrus.hibernate.Transaction tx = null; try { if (log.isDebugEnabled()) log.debug("Getting Hibernate session."); session = this.sessionFactory.openSession(); if (log.isInfoEnabled()) log.info("Starting database transaction."); tx = session.beginTransaction(); And I end the transaction like this: if (log.isInfoEnabled()) log.info("Committing database transaction."); tx.commit(); if (log.isInfoEnabled()) log.info("Database transaction committed successfully."); } catch (SQLException e) { log.error(e); this.rollbackTransaction(tx); // just an exception handling helper func throw new ServletException(e); } catch (HibernateException e) { log.error(e); this.rollbackTransaction(tx); // just an exception handling helper func throw new ServletException(e); } catch (Exception e) { log.error(e); this.rollbackTransaction(tx); // just an exception handling helper func throw new ServletException(e); } finally { try { session.close(); } catch (SQLException e) { } catch (HibernateException e) {} if (log.isDebugEnabled()) log.debug("Closed Hibernate session."); } } Everything goes fine until finally block. It gives me warnings: 21:35:24,381 WARN [JDBCExceptionReporter] SQL Warning: 0, SQLState: null 21:35:24,381 WARN [JDBCExceptionReporter] WARNING: COMMIT: no transaction in progress What causes these? Am I doing something wrong? If I tx.commit, do I still need to close session? If I do, then how do I close session without the warnings mentioned above? Regards Aapo <b/>ungle Laakkonen |