Re: [Hibernate] Deployment of Hibernate on JBoss-3.0.4
There are extensive documents on the Wiki and examples that can be downloaded. Just a comment but this question realy belongs on the SF forum not the dev list. - Original Message - From: "Prasad Iyer" <[EMAIL PROTECTED]> To: "Hibernate" <[EMAIL PROTECTED]> Sent: Tuesday, August 12, 2003 5:04 PM Subject: [Hibernate] Deployment of Hibernate on JBoss-3.0.4 > Hi, > Anyone has tried deploying Hibernate as service on JBoss-3.0.4. > I would highly appreciate if someone could help me with the .sar file and > integration of service in web.xml file > regards > prasad chandrasekaran > > > > --- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Middlgen plugin wish list.
I have a few extensions to the Middlegen plugin (that I have been using locally). There have been quite afew users of the plugin and thus this email is a request for comments as to what extra functionality would help you. I cannot guarentee that it will be in the r2 release, though I will consider all suggestions. Cheers David. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Middlgen plugin wish list.
Gavin, Currently the version (that is release v1 found on hibernate sf downloads) is built against the version 2 beta 2 src tree. The plugin has been committed to an earlier CVS branch that started as the base for the refactoring effort Alask (and the team) had been working on for the first version 3 beta, eg, the codehaus version. There will not be a true version 2 release as there was a problem found in dealing with certain database schemas. Apparently, the effort was such that Alask decided to update the architecture at the same time. It is along the lines of the new XDoclet 2 design and shares much of the core components. When Alask is ready, I will be given CVS commit access to codehaus version 3 beta and port the Middlegen plugin. This is why I have not done a release 2 (as yet). I have been considering doing the release 2 against middlegen 2b2 though I understand the new version will be ready for plugin authors in weeks rather than months. I would not expect a v3b1 release before JAOO. I am undecided whether to do a release 2 or wait just a while longer. In some respects this is why I have sent this email out. The responce(s) will help with the decision. I did not want the Middlegen efforts to bog down overley. I am likely to wait a little longer and review progress. Cheers David. - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "David Channon" <[EMAIL PROTECTED]> Cc: "hibernate list" <[EMAIL PROTECTED]> Sent: Tuesday, September 02, 2003 3:41 PM Subject: Re: [Hibernate] Middlgen plugin wish list. > David, exactly what version of Middlegen is the Hibernate plugin working > against? The new (codehaus) version? > > > > I have a few extensions to the Middlegen plugin (that I have been using > > locally). There have > > been quite afew users of the plugin and thus this email is a request for > > comments as to what > > extra functionality would help you. I cannot guarentee that it will be in > > the r2 release, though > > I will consider all suggestions. > > > > Cheers David. > > > > > > > > > > > > --- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Middlgen plugin wish list.
Max, I look in both Midldlegen JIRA and Hibernate JIRA and did basic searches. Maybe my lack of JIRA knowledge but I could not find anything. I am aware of the Compound Key should have the type in it to allow hbm2java to create the class correctly. I basic improvement (not ideal) is in the Middlegen CVS to deal with this. I have gone a little further (but it is a pain (From the GUI presentation perspective rather than technical). Cheers David, - Original Message - From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> To: "Gavin King" <[EMAIL PROTECTED]> Cc: "David Channon" <[EMAIL PROTECTED]>; "hibernate list" <[EMAIL PROTECTED]> Sent: Tuesday, September 02, 2003 11:47 PM Subject: Re: [Hibernate] Middlgen plugin wish list. > I have made some comments on the JIRA (on middlegen) - it would be nice > if those things was fixed ;) > > /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] List alive
The activity on this List has just abput died for me. Has there been any changes of late? (Maybe the new forum is working so well this list is not required - just asking). Cheers David, --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] DTD version for 2.1
I have been fine tuning release 2 of the Middlegen plugin and implementing functionality that is to be found only in hibernate 2.1. In this case I am refering to the extension to the one-to-one mapping. The extension for foreign key link allows one-to-one mappings from Middlegen to work correctly. So currently the 2.1 betas are still verifying on a version 2.0 DTD. Is the DTD version going to remain the same when 2.1 final is released or will it be changed to 2.1? Thanks, Cheers David. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] [Announce] Release 2 Middlegen Plugin Released.
Please find the src for the latest version of the Hibernate plugin. This is release two which represents a few enhancements and a number of bug fixes. The following is what has been included: o Fields that were for display purposes only where changes would not be persisted will no longer allow you to modifiy the contents. o Compound key generation did not include the type (which was later added to CVS) though the GUI did not allow the Compound key field types to be changed. This now operates correctly so hbm2java can generate the compound key classes correctly. o Compound keys for Many2Many relations has been fixed. o One2one relationship are now generated correctly using new features found in hibernate 2.1 (Dont use this option with earlier 2.0.x versions. All other mappings work fine under 2.0 o Removed the Interceptor interface option (as its not for domain object use). o Added the ability to select an Id generation strategy for each domain class. Allow an argument to be entered that is used with a few of the Id generation schemes. o Middlegen jar has been built from the 'VALUEOBJECT_REFACTORING_BRANCH' which is the base for Middlegen 3.0. It has a number of bug fixes from the version used in release 1. Also updated a few secondary Jars included with the example. Note: I decided to Leave POJO generation for next release as there were enough issues to get this into the user community (and I still had some work left to do to support all options with this feature). Cheers David. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] stored procedure and Hibernate ?
Sure you can. Use the JDBC connection you can get from the session and call the stored procedure. Native hibernate support is being currently considered. - Original Message - From: "bertrand lancelot" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 10, 2003 10:22 PM Subject: [Hibernate] stored procedure and Hibernate ? > Is it possible to call a stored procedure in PLSQL with Hibernate 2.0.3 ? > > If yes, can you give me an example ? > > Best regards, > ;o) > > > > --- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] EHCache
I think its a good idea. Because of the new caching API it does not stop someone using JCS but caching is so important that an active group would be best. BTW: Like the colors they have picked for the logo :-). Now what does this change (and the generalisation) mean to the DTD and all those JCS cache tags? --David. - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "hibernate list" <[EMAIL PROTECTED]> Sent: Friday, November 14, 2003 11:17 AM Subject: [Hibernate] EHCache > > Greg Luck has forked JCS and created a new project on sf.net. IMO we > should replace our JCS integration with EHCache. Does anyone object to > simply removing JCS support in 2.1? I think we have all seen how there > are problems with robustness / performance in the build we are currently > using. > > http://ehcache.sourceforge.net/ > > > -- > Gavin King > JBoss Group > +61 410534454 > http://hibernate.org > > > > --- > This SF.Net email sponsored by: ApacheCon 2003, > 16-19 November in Las Vegas. Learn firsthand the latest > developments in Apache, PHP, Perl, XML, Java, MySQL, > WebDAV, and more! http://www.apachecon.com/ > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Re: AST parser for HQL
Great work. This will make further enhancements to the Select clause much easier. Here are a few more queries from the test package that I use to test some of the more recent (and not so well documented) changes to the select clause, eg, dialect functions. This one is not recent but affects the parser somewhat and was not in your test suite. select new net.sf.hibernate.test.S(s.count, s.address) from s in class Simple These a few tests for delects functions. From the tests it would look like it would work as it stands although problem maybe with some functions that have no arguments, for example,those that have no parenthesis, eg, Oracle dialect select s.name, sysdate, trunc(s.pay), round(s.pay) from s in class Simple Just for the record, Nested examples. select abs(round(s.pay)) from s in class Simple select trunc(round(sysdate)) from s in class Simple The current parser cannot do it at the moment (it is a pain in current form) but multiple arguments comma separated is easy for you to add, so we then hook into it, select round(s.pay, 2) from s in class Simple being very greedy it would be also real nice to include the usual literal types and operators in the select clause. These we also cannot do at the moment. I do assume that this will get integrated in the 2.2 series as it is fairly major surgery to hook this into the backend. Look forward to it. --David. - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Joshua Davis" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, November 16, 2003 1:50 PM Subject: [Hibernate] Re: AST parser for HQL > Fantastic! I presume that you meant to send this to hibernate-devel, not > hibernate-devel-admin, so I'm forwarding to the list > > You are using ANTLR, right? This is good. I think its better than JavaCC > from my small amount of contact with each. > > > Joshua Davis wrote: > > > Hibernate programmers, > > > > I'm just about done with a working version of an HQL parser that > > produces ASTs. It parses most of the examples now, except for the ones > > where keywords are identifiers and identifiers are keywords > > simultaneously ;). Anyone interested in reviewing it? Some example > > output is enclosed. > > > > Josh > > > > > > [[CUT TESTS]] --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Re: AST parser for HQL
In the select clause there is the option to include the current date native function as a part of the dialect. As Joshua stated the parser looks these tokens up from the current dialect when its parsing this part of the query. Currently there is no alias. I had considered adding it but decided not to for the moment. Gavin has said you can use substitution as a workaround but I have not tried it. I kind of prefer the idea of aliases so over time we can decide on an offical HQL name for these functions. Many of which are the same across database vendors but current date varies greatly. I should look at every supported database and see what is common and move it into the base dialect just as max(), min() etc are implemented. Now the where clause passes the items as is through to the SQL engine if it cannot determine its a table alias. Thus all native functions are available. There is currently no dialect mappings for this section of the parser. If we use aliasses and/or move them into official HQL token then, some functions that are valid in this clause of HQL, would require the mapping to be applicable in the where clause aswell. Cheers David. - Original Message - From: "Les A. Hazlewood" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 17, 2003 8:08 AM Subject: RE: [Hibernate] Re: AST parser for HQL > > I am not familiar with the 'current date' construct in this example: > > "from Calendar cal where cal.holidays.maxElement > current date" > > > > Is 'current' a function? If so, is 'date' the argument? Is this ORACLE > > specific? > > "current date" would need to be a Hibernate defined token. > > Oracle uses "sysdate" for the current date/time > Postgres uses "now" > etc, > etc, > > IMHO, I think the token "now" would be good to use, since its a little more > intuitive than sysdate or most other timestamp tokens out there. For example, > when looking at the tokens "sysdate" or "CURRENT_DATE" does that just mean an > SQL date and not a timestamp? In Oracle it doesn't. What about tokens like > "CURRENT_TIME"? Does that just mean an SQL time and not a timestamp? > > Maybe tokens like CURRENT_TIMESTAMP or "now" make more sense for the current > system timestamp > > Les > > > --- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Re: AST parser for HQL
I think limited application of aliases would be beneficial but query substitutions would work in many situations. The current date issue I am not sure that it is one of them. I am guilty of having not tried hibernate.query.substitutions on this level. I am not sure you can use this to deal with the wide variances in current date syntax. Oracle = sysdate (No brackets). DB2 = current date (No Brackets, and a space [real pain for a parser]) HSQL= current_date() Postgress= now() How about alias today()? Not sure what other "common" items would require aliases, the rest use substitutions, direct dialect and pass through. Ideas? In anycase, supporting two parsers will be necessary across actively supported versions. We talked a little about a Version 3 where package names get changed to org.hibernate and other items changed as well but the fear/issue was breaking to much existing code. Don't want to do this lightly. Is this step with the new parser and possible changes to the supported syntax a Version 3 option? --David. - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Joshua Davis" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, November 18, 2003 12:01 AM Subject: Re: [Hibernate] Re: AST parser for HQL > I don't think we are realistically going to be able to dream up portable > aliases for everything. I can see an argument for doing it for a couple > of very important cases like current date. Beyond that I wouldn't really > like to go there. Note that you can't have both really ... as soon as > you have too many aliases, they start to clobber the namespace of > proprietary and user-defined functions. > > Note also that the user can define portable aliases for themselves in > the current parser, by specifying hibernate.query.substitutions. > > Joshua Davis wrote: > > > David, > > > > Excelent point. It looks like a design decision is required here (i.e. > > portable aliases vs. proprietary pass-through). Personally, I like the idea > > of portable aliases for special features, as I'm not sure how I'm going to > > plug Hibernate's dialect information into the parser. It's probably not to > > hard to do that though, if someone would be kind enough to point me at the > > right part of the Hibernate API. :) > > > > > > Josh > > > > --- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Re: AST parser for HQL
I agree with the SQL-92 function option should eb included as the base set of supported functions. How many of our supported database are SQL-92? Obviously that will workout when the work is being done. I do like the idea of the extended syntax Gavin suggested but do question whether we need the extra complexity (though its hidden in the parser and only has to swap a few tokens[which is not always easy]). The Dialects support function signatures now and its common to SQL syntax so I would stay with that. Yes the alias would be a small extension on the current lookup mechanism in place now. Not difficult for the select clause since its basicly there, harder for the where clause since its a pure pass through. The dialect could provide a hook to provide the native name if passed the HQL name so in the unusual case where the function is non SQL-92 and the developer needs to use it in the where clause they can get the native name to use in the query string. This might do while the parser is upgraded. --David., - Original Message - From: "Les A. Hazlewood" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 18, 2003 4:05 AM Subject: Re: [Hibernate] Re: AST parser for HQL > > How about we get a list of ANSI-standard SQL functions and portably > > support those and those only (I don't think there are many of them). > > This makes a lot of sense. However, what if something so commonly used (like a > current_timestamp() function) is not part of the ANSI standard (assuming ANSI > SQL-92)? Would you make exceptions for that? > > I like the query substitution feature, but that requires effort on part of the > developer for even the most common tokens. I certainly agree that feature is > valuable for the occasional weird tokens a user may need. But highly common > substitutions that are supported by all rdmbs implementions should naturally be > part of the corresponding Dialect. > > Thinking out loud here, but for aliases for commonly used SQL functions/tokens, > wouldn't it be good to define them as part of the dialect via an internal lookup > table? These HQL standard aliases could also be prefixed with a hql identifier > to make it easy to signify when substitution should occur (and would be used as > the key in the Dialect's lookup table). > > (stupid example...returns everything...but you get the idea): > from MyClass obj where obj.creationTime < hql:now > > examples: > hql:current_date > hql:current_time > hql:current_timestamp or hql:now > > or you could ignore this approach completely and just use a function signature > itself as the token for lookup: > > current_date() > current_time() > current_timestamp() or now() > > although it seems logical to me that the first approach would be easier for a > lexical analyzer to handle. > > Just pondering... > > Cheers, > > Les > > > --- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Re: AST parser for HQL
I really do think we need to set the HQL name (since it is our syntax) rather than use raw or what ever as a prefix. Common functions should have a common name in HQL so the dialects provide a high degree of portability. The function can never be a simple pass through in the select clause as HQL engine will always need to know the type of the returned value. Now in some cases this type result may have involved type conversions depending on the term(s) used. Pass through is no problem for the where clause. --David. - Original Message - From: "Chris Nokleberg" <[EMAIL PROTECTED]> To: "Joshua Davis" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, November 18, 2003 6:13 AM Subject: Re: [Hibernate] Re: AST parser for HQL > On Mon, Nov 17, 2003 at 11:54:54AM -0800, Joshua Davis wrote: > > That's a neat idea. So, 'raw:' would be a > > pass-through that would pass things directly to the > > underlying engine. The only issue there is when the > > underlying syntax does not obey the rules of the > > over-arching grammar (e.g. 'current date', there is no > > ident ident rule). This means the parser cannot > > recognize the construct, and therefore it cannot be > > passed through. For this type of situation, you would > > need to have some quoting syntax to get the parser to > > treat the construct as a string. Don't know if you > > guys want to go that far though. > > I suppose you could do something like > raw "current date" > > So 'raw' becomes a keyword that modifies the next token. > > But the goal, I think, should be to eliminate the need for raw as much > as possible, so "now()" would be much preferrable for this particular > example. > > > For driver-specific functions you could potentially have a prefix that > > indicates it should flow through into the resulting xml > > Of course I meant SQL, not xml :-) > > Chris > > > --- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Middlegen hibernate plugin release 4
I am about to release the 4th release of the plugin. Waiting for SF to come back up. The next release will feature more enhancements. Anyway here are the details: --David, This is the fourth release of the Middlegen with hibernate plugin. It includes enhancements and fixes. It has: o Middlegen 2.0 vo (final) - Middlegen 2 is out of beta. o The Code has been moved to CVS Head so updates should be smoother now. o A new full release has been added to the Middlegen sourceforge download. o XDoclet 1.2 final jars (a subset) included. o Fixed Minor typo for XDoclet meta Tags for the class defintion generation. o Added XDoclet meta tags for elements of the compound keys. o (Re)Introduced the Unique constraints detection in Middlegen core. o Mappings will be correctly generated with the unique attribute. o Added inherit="false" to a number of the meta tags for some standard meta attributes and XDoclet meta attributes. o Fixed issue where sometimes the generator assigned was being reset in the GUI. o Changed one-to-one mappings to not use contrained="true" for nullable foreign keys. o Fixed one-to-one constrained="true" moved it to the otherside of relationship. o Added the ability to provide custom defaults for Type selection. o This option allow the developer to provide a JavaTypeMapper plugin for the Hibernate plugin. o The custom mapper is introduced through the Ant script - see docs. o Provided a much improved type selection module (HibernateJavaTypeMapper) using the new JavaTypeMapper plugin mechanism. o The class provides an example on how you can build your own custom JavaTypeMapper. o It provides better selection of selection of default types and considers if the SQL type is a nullable field. o Preferences file is now located in Src rather than Build (as it was in some previous releases). o Other minor changes --- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] SessionFactoryObjectFactory (Tomcat & JNDI)
John et al, Please note that this new code module added added as a part of Middlegen 2.1 we are working on at the moment. Its an improvement on the old demo application that had an EJB backend that we have supplied with previous versions of the tool. Since this is only in CVS it is likely to not be working totally correctly at this point. That being said any issues being reported are very helpful. The middlegen dev list might have been a better place to direct your concerns. Thanks, Cheers David. - Original Message - From: "John J. Allison" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 07, 2004 9:34 AM Subject: Re: [Hibernate] SessionFactoryObjectFactory (Tomcat & JNDI) > > How about giving us a hint what was wrong with the existing > > implementation. No-one else has ever complained. > > Sure, sorry. > The code generated by Middlegen is doing this: > > net.sf.hibernate.SessionFactory factory = > (net.sf.hibernate.SessionFactory)ctx.lookup("java:comp/env/AirlineHibernateF actory"); > net.sf.hibernate.Session session = factory.openSession(); > > But that just results in a null being returned and the log file messages: > > 2004-04-02 15:55:43 Apr 2, 2004 3:55:43 PM net.sf.hibernate.impl.SessionFactoryObjectFactory getInstance > WARNING: Not found: Shareable > > Poking around, I noticed that SessionFactoryObjectFactory never > actually creates a SessionFactory. When getObjectInstance() is > called, that's what Tomcat expects - for a SessionFactory instance > to be created. > > The only place a SessionFactoryObjectFactory seems to be deal with > an actual SessionFactory instance is when SessionFactoryImpl calls > SessionFactoryObjectFactory.addInstance(). But when Tomcat calls > getObjectInstance() there is no SessionFactoryImpl around. Tomcat > expects SessionFactoryObjectFactory to create what it needs to. > > Maybe nobody else has complained since they've bitten the bullet > and are creating and configuring hibernate directly. > I have not found on the Hibernate website or this list's archives, > or anywhere, a solution using Resource/ResourceParms in one's > Context element for Tomcat. If I am missing something, please tell me. > > My BasicSessionFactoryObjectFactory makes Tomcat work without > changing the simple Middlegen style of code, or having to manage > a SessionFactory in your applicaton context (to e.g. use the singleton > HibernateSession), and without the problems of JndiSessionFactoryImpl, > both noted on: > http://www.hibernate.org/114.html > > Perhaps JndiSessionFactoryImpl could have been modified to work, but I > chose to work with SessionFactoryObjectFactory. > > Make sense? What am I missing? > > John Allison > [EMAIL PROTECTED] > > > --- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Annotated collections
Emmanuel, Composition would be my preferred approach. I agree that the flat representation of XDoclet is less intuitive. Cheers David. - Original Message - From: "Emmanuel Bernard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 01, 2004 7:03 PM Subject: [Hibernate] Annotated collections > I'm working on collection annotations right now, and I don't like the > way it goes. > Since now I managed to annotate using composition for dependent annotation > @Id ( > @Generator( > @Param[] > ) > ) > And I strongly believe it's the best way to do. > > But for collections, this is more complex. > There should be something like > > @Map ( > @Index(), > @OneToMany() > ) > The problem is that Index can be CompositeIndex, IndexManyToMany etc > And OneToMany can be Element, ManyToMany etc and each of these > annotations structure are different. > > 2 solutions so far: > - Declare all kind of indexes inside Map and let the user set 1 of > these (other will have a default 'not used' value) > - Use the XDoclet way and put Map, Index etc flatten in the property. > > Remember that Annotation cannot be inherited and annotations does not > support some kind of (Index|CompositeIndex) like DTD does. > > The first one is a bit ugly but keep the composition way to do, and is > in my opinion much more readable when writing a metadata annotation for > a class. Of course a user could set 2 index or 2 elements in the same > Annotation, this should e checked at runtime. > The second one is ugly too. I've always found flatten XDoclet way too > complex: people never know which one to put together. And it does not > prevent the 2 indexes in the same annotated element issue. > Unfortunatly, due to Annotation flaws, neither can be ckecked at compile > time (at least I've not found how). But it'll be much simplier for me to > ckeck that at compile time in the first solution. > > I plan to go the the composition way. Any comment, vetoe? > > -- > Emmanuel Bernard > [EMAIL PROTECTED] > http://www.hibernate.org > > > > --- > This SF.Net email is sponsored by Sleepycat Software > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to > deliver higher performing products faster, at low TCO. > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Middlegen Hibernate plugin 5 - released.
Hi, I have just released the Middlegen-Hibernate plugin R5. It has significant improvements and fixes. I recommend all Hibernate-plugin users upgrade to this version. Download package from HIbernate SF downloads. The release notes follow. Enjoy, Cheers David. This is the fifth release of the Middlegen with hibernate plugin. It includes enhancements and fixes. o Middlegen 2.1 beta - Middlegen 2.1 development from CVS HEAD o Added a few minor GUI enhancements. o Can tear away the configuration options panel. o The Divider can be dropped to allow all of the screen area to see the Table graph. o Shows the Original Table column types and names. o Displays the window correctly when large number of tables being used. o Some usage hints displayed. (Note: Major changes are due to be made to the GUI hopefully in the next release). o Updated many option for Hibernate 2.1.x series. o Proxy or lazy attribute at the class level mapping. o both dynamic-insert and dynamic-update o select-before-update o batch-size value o class level where clause filter o access properties by field or property methods o can default to native generator - ant o can set cascade save-update - ant o Equals / Hashcode generation meta data for both class and field level. o Many composite key improvements o Select either Plain compound keys (no key-many-to-one etc) or extended relationship keys. Defaults to Plain compound keys. o Unsaved value for versioned composite keyed domain objects o One-to-one compound key improvements. o Misc improvements allows more variations to be generated. o Minor JavaTypeMapper enhancements (Brett Randal). o Table name and property name improvements. o Name conversion enhancements. o Singularisation / Pluralisation fixes - additional situations addressed. o Change to property generation name for Hibernate compatibility. o Inactive ends of relationships are generated correctly. o Can now turn both directions of a relationship off and the result will appear like the constraint did not exist. o Property selector improvement for changing between various property options, ie, version. o Fixed some XDoclet attributes. o Some support for Table generation from views. o Other minor changes --- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel