|
From: Magnus H. <ma...@fi...> - 2005-11-22 12:12:20
|
Hi. I am looking into domain objects and DI. Objects loaded by hibernate or created pragmatically. Google and the spring forms comes up with many solutions and code examples. I also remember Rod mention something about this in some mailinglist a while back? Searching JIRA for DependencyInjectionInterceptorFactoryBean.java comes up with SPR-431 set for 1.4RC1 and SPR-1163 in 1.3RC1. Is this the path that I should choose that will be incrementally more and more supported by spring? Other blogs are suggesting more AspectJ integrated solutions: http://www.aspectprogrammer.org/blogs/adrian/2005/03/hacking_with_ha.html is this also an alternative to consider? -- /Magnus Heino |
|
From: Seth L. <set...@gm...> - 2005-11-22 18:58:35
|
> Searching JIRA for DependencyInjectionInterceptorFactoryBean.java > comes up with SPR-431 set for 1.4RC1 and SPR-1163 in 1.3RC1. Is this > the path that I should choose that will be incrementally more and more > supported by spring? That code, found in the sandbox, is quite solid. I've used it in our app for a long time, with great results. I'm hoping it'll get moved up to the formal code base in Spring 1.3. Seth |
|
From: Rob H. <rob...@in...> - 2005-11-23 20:52:44
|
The code from the blog entry you suggested will make it into the 1.3 release in time for RC1. Also, I am hoping to release DIIFactoryBean in RC2 which should give you plenty of options. The AspectJ solution is certainly my preference. Rob Magnus Heino wrote: >Hi. > >I am looking into domain objects and DI. Objects loaded by hibernate >or created pragmatically. > >Google and the spring forms comes up with many solutions and code >examples. I also remember Rod mention something about this in some >mailinglist a while back? > >Searching JIRA for DependencyInjectionInterceptorFactoryBean.java >comes up with SPR-431 set for 1.4RC1 and SPR-1163 in 1.3RC1. Is this >the path that I should choose that will be incrementally more and more >supported by spring? > >Other blogs are suggesting more AspectJ integrated solutions: >http://www.aspectprogrammer.org/blogs/adrian/2005/03/hacking_with_ha.html >is this also an alternative to consider? > >-- > > /Magnus Heino > > >------------------------------------------------------- >This SF.Net email is sponsored by the JBoss Inc. Get Certified Today >Register for a JBoss Training Course. Free Certification Exam >for All Training Attendees Through End of 2005. For more info visit: >http://ads.osdn.com/?ad_idv28&alloc_id845&op=click >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > -- Rob Harrop Principal Consultant Interface21 - Spring Services from the Source http://www.springframework.com |
|
From: Bram S. <br...@in...> - 2005-11-23 23:00:12
|
Hi All, This week, at a customer, I encountered some annoying behavior with the ResourceBundleViewResolver. When the view class, specified in the properties file, contains a trailing whitespace in the class name, you get a ClassNotFoundException with the message: java.lang.ClassNotFoundException: org.springframework.web.servlet.view.InternalResourceView This proved to be very confusing to developers (as I reckon it is, as the whitespace is not visible in the error message). The problem lies in the fact that the PropertiesBeanDefinitionReader does not trim the values obtained from the resource bundle. Is it possible to add trimming of the values in the resource bundles, or do I miss some implications this might have? It is fairly simple to test, I just added another test to the ResourceBundleViewResolverTests that checks for an additional view (with a trailing whitespace in the class name). Greetings, Bram Smeets -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.5/178 - Release Date: 22-11-2005 |
|
From: Juergen H. <ju...@in...> - 2005-11-24 22:19:21
|
Hi Bram, Sounds appropriate. I've refined PropertiesBeanDefinitionReader to trim String values that it encounters, for all special keys (that is, everything other than values for actual bean properties). Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Bram Smeets Sent: Wednesday, November 23, 2005 11:59 PM To: spr...@li... Subject: [Springframework-developer] Trimming values in PropertiesBeanDefinitionReader Hi All, This week, at a customer, I encountered some annoying behavior with the ResourceBundleViewResolver. When the view class, specified in the properties file, contains a trailing whitespace in the class name, you get a ClassNotFoundException with the message: java.lang.ClassNotFoundException: org.springframework.web.servlet.view.InternalResourceView This proved to be very confusing to developers (as I reckon it is, as the whitespace is not visible in the error message). The problem lies in the fact that the PropertiesBeanDefinitionReader does not trim the values obtained from the resource bundle. Is it possible to add trimming of the values in the resource bundles, or do I miss some implications this might have? It is fairly simple to test, I just added another test to the ResourceBundleViewResolverTests that checks for an additional view (with a trailing whitespace in the class name). Greetings, Bram Smeets -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.5/178 - Release Date: 22-11-2005 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Bram S. <br...@in...> - 2005-11-25 18:38:10
|
Alright, thanks. Greetings, Bram -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Juergen Hoeller Sent: donderdag 24 november 2005 23:19 To: spr...@li... Subject: Re: [Springframework-developer] Trimming values in PropertiesBeanDefinitionReader Hi Bram, Sounds appropriate. I've refined PropertiesBeanDefinitionReader to trim String values that it encounters, for all special keys (that is, everything other than values for actual bean properties). Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Bram Smeets Sent: Wednesday, November 23, 2005 11:59 PM To: spr...@li... Subject: [Springframework-developer] Trimming values in PropertiesBeanDefinitionReader Hi All, This week, at a customer, I encountered some annoying behavior with the ResourceBundleViewResolver. When the view class, specified in the properties file, contains a trailing whitespace in the class name, you get a ClassNotFoundException with the message: java.lang.ClassNotFoundException: org.springframework.web.servlet.view.InternalResourceView This proved to be very confusing to developers (as I reckon it is, as the whitespace is not visible in the error message). The problem lies in the fact that the PropertiesBeanDefinitionReader does not trim the values obtained from the resource bundle. Is it possible to add trimming of the values in the resource bundles, or do I miss some implications this might have? It is fairly simple to test, I just added another test to the ResourceBundleViewResolverTests that checks for an additional view (with a trailing whitespace in the class name). Greetings, Bram Smeets -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.5/178 - Release Date: 22-11-2005 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.7/182 - Release Date: 24-11-2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.7/182 - Release Date: 24-11-2005 |
|
From: Magnus H. <ma...@fi...> - 2005-11-24 07:37:02
|
2005/11/23, Rob Harrop <rob...@in...>: > The code from the blog entry you suggested will make it into the 1.3 > release in time for RC1. Also, I am hoping to release DIIFactoryBean in > RC2 which should give you plenty of options. > > The AspectJ solution is certainly my preference. This is very cool! :-) So, using this stuff and some implementation of SPR-1047, I can configure all beans using just a @Bean annotation and be sure that my dependencies are setup ok? Are there any thoughts on not needing the setter method for required properties? I mean, if you have a @RequiredProperty or simular set on a property that should be validated, why also have a setter? Something like the EJB3 @Resource annotation I guess. /Magnus |
|
From: Rob H. <rob...@in...> - 2005-11-24 13:11:07
|
It is indeed very cool. What is also interesting is the support for bootstrapping Spring inside a J2SE environment using AspectJ. Not really thought about field injection that much, because I'm not really a fan. It makes testing a class a real pain in my experience. Of course, if there is real community interest in having field level injection then it is a trivial feature to add. Rob Magnus Heino wrote: >2005/11/23, Rob Harrop <rob...@in...>: > > >>The code from the blog entry you suggested will make it into the 1.3 >>release in time for RC1. Also, I am hoping to release DIIFactoryBean in >>RC2 which should give you plenty of options. >> >>The AspectJ solution is certainly my preference. >> >> > >This is very cool! :-) > >So, using this stuff and some implementation of SPR-1047, I can >configure all beans using just a @Bean annotation and be sure that my >dependencies are setup ok? > >Are there any thoughts on not needing the setter method for required >properties? I mean, if you have a @RequiredProperty or simular set on >a property that should be validated, why also have a setter? Something >like the EJB3 @Resource annotation I guess. > >/Magnus > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://ads.osdn.com/?ad_idv37&alloc_id865&op=click >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > -- Rob Harrop Principal Consultant Interface21 - Spring Services from the Source http://www.springframework.com |