You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Alef A. \(JTeam\) <al...@jt...> - 2003-10-29 19:39:53
|
Hmmm, hibernate is running their JIRA instance at Atlassian itself, they probably wouldn't mind running a Spring one as well, would they? We might as well just conatct them... Any volunteers? Alef P.s. that doesn't mean I don't wanna give up the bandwidth, it's just that it's probably no worry for htem :) > -----Oorspronkelijk bericht----- > Van: spr...@li... > [mailto:spr...@li...] > Namens Kopylenko, Dmitry > Verzonden: Wednesday, October 29, 2003 7:30 PM > Aan: 'spr...@li...' > Onderwerp: RE: [Springframework-developer] JIRA > > > Sounds good. > > -----Original Message----- > From: Alef Arendsen (JTeam) [mailto:al...@jt...] > Sent: Wednesday, October 29, 2003 12:37 PM > To: spr...@li... > Subject: RE: [Springframework-developer] JIRA > > > Codehaus sounds good, however, if it isn't possible (they're > hosting picocontainer, maybe they don't like us there :), I > don't care about running it here... There a 512kb uplink (and > way too much down) so that should suffice... As long as it > fits in our current live environment > (JBoss/MySQL) and it does not require huge memory footprints... > > Alef > > > -----Oorspronkelijk bericht----- > > Van: spr...@li... > > [mailto:spr...@li...] > > Namens Colin Sampaleanu > > Verzonden: Wednesday, October 29, 2003 6:04 PM > > Aan: spr...@li... > > Onderwerp: Re: [Springframework-developer] JIRA > > > > > > +1 on the idea. There is a question as to where it would > be hosted > > though. Maybe we could convince the CodeHaus guys to use theirs: > > http://jira.codehaus.org/secure/Dashboard.jspa > > > > > > Kopylenko, Dmitry wrote: > > > > > Hello everyone, > > > > > > Would it be a good idea to use JIRA for Spring project tracking? I > > > just saw on their site that they have a free license for > > open source > > > projects. > > > > > > What do you think? > > > > > > Regards, > > > Dmitriy. > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. Does > > SourceForge.net help you be more productive? Does it > > help you create better code? SHARE THE LOVE, and help us help > > YOU! Click Here: http://sourceforge.net/donate/ > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/s> pringframework-developer > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Kopylenko, D. <dko...@ac...> - 2003-10-29 18:30:07
|
Sounds good. -----Original Message----- From: Alef Arendsen (JTeam) [mailto:al...@jt...] Sent: Wednesday, October 29, 2003 12:37 PM To: spr...@li... Subject: RE: [Springframework-developer] JIRA Codehaus sounds good, however, if it isn't possible (they're hosting picocontainer, maybe they don't like us there :), I don't care about running it here... There a 512kb uplink (and way too much down) so that should suffice... As long as it fits in our current live environment (JBoss/MySQL) and it does not require huge memory footprints... Alef > -----Oorspronkelijk bericht----- > Van: spr...@li... > [mailto:spr...@li...] > Namens Colin Sampaleanu > Verzonden: Wednesday, October 29, 2003 6:04 PM > Aan: spr...@li... > Onderwerp: Re: [Springframework-developer] JIRA > > > +1 on the idea. There is a question as to where it would be hosted > though. Maybe we could convince the CodeHaus guys to use theirs: > http://jira.codehaus.org/secure/Dashboard.jspa > > > Kopylenko, Dmitry wrote: > > > Hello everyone, > > > > Would it be a good idea to use JIRA for Spring project tracking? I > > just saw on their site that they have a free license for > open source > > projects. > > > > What do you think? > > > > Regards, > > Dmitriy. > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Alef A. \(JTeam\) <al...@jt...> - 2003-10-29 17:37:39
|
Codehaus sounds good, however, if it isn't possible (they're hosting picocontainer, maybe they don't like us there :), I don't care about running it here... There a 512kb uplink (and way too much down) so that should suffice... As long as it fits in our current live environment (JBoss/MySQL) and it does not require huge memory footprints... Alef > -----Oorspronkelijk bericht----- > Van: spr...@li... > [mailto:spr...@li...] > Namens Colin Sampaleanu > Verzonden: Wednesday, October 29, 2003 6:04 PM > Aan: spr...@li... > Onderwerp: Re: [Springframework-developer] JIRA > > > +1 on the idea. There is a question as to where it would be hosted > though. Maybe we could convince the CodeHaus guys to use theirs: > http://jira.codehaus.org/secure/Dashboard.jspa > > > Kopylenko, Dmitry wrote: > > > Hello everyone, > > > > Would it be a good idea to use JIRA for Spring project tracking? I > > just saw on their site that they have a free license for > open source > > projects. > > > > What do you think? > > > > Regards, > > Dmitriy. > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Colin S. <col...@ex...> - 2003-10-29 17:03:51
|
+1 on the idea. There is a question as to where it would be hosted though. Maybe we could convince the CodeHaus guys to use theirs: http://jira.codehaus.org/secure/Dashboard.jspa Kopylenko, Dmitry wrote: > Hello everyone, > > Would it be a good idea to use JIRA for Spring project tracking? I > just saw on their site that they have a free license for open source > projects. > > What do you think? > > Regards, > Dmitriy. > |
|
From: William G. T. Jr. <wg...@ru...> - 2003-10-29 15:33:02
|
+1 for JIRA! Cameron Braid wrote: > I think it is a great idea. > > WebWork and Hibernate use JIRA, and we use it internally. > > It is a great product. > > Cameron > > Kopylenko, Dmitry wrote: > >> Hello everyone, >> >> Would it be a good idea to use JIRA for Spring project tracking? I >> just saw on their site that they have a free license for open source >> projects. >> >> What do you think? >> >> Regards, >> Dmitriy. >> > |
|
From: Alef A. \(JTeam\) <al...@jt...> - 2003-10-29 13:25:37
|
+1 > -----Oorspronkelijk bericht----- > Van: spr...@li... > [mailto:spr...@li...] > Namens Cameron Braid > Verzonden: Wednesday, October 29, 2003 2:16 PM > Aan: spr...@li... > Onderwerp: Re: [Springframework-developer] JIRA > > > I think it is a great idea. > > WebWork and Hibernate use JIRA, and we use it internally. > > It is a great product. > > Cameron > > Kopylenko, Dmitry wrote: > > > Hello everyone, > > > > Would it be a good idea to use JIRA for Spring project tracking? I > > just saw on their site that they have a free license for > open source > > projects. > > > > What do you think? > > > > Regards, > > Dmitriy. > > > > > -- > Any damn fool can write code that a computer can > understand... The trick is to write code that humans can > understand. [Martin Fowler > http://www.martinfowler.com/distributedComputi> ng/refactoring.pdf] > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Cameron B. <ca...@da...> - 2003-10-29 13:17:04
|
I think it is a great idea. WebWork and Hibernate use JIRA, and we use it internally. It is a great product. Cameron Kopylenko, Dmitry wrote: > Hello everyone, > > Would it be a good idea to use JIRA for Spring project tracking? I > just saw on their site that they have a free license for open source > projects. > > What do you think? > > Regards, > Dmitriy. > -- Any damn fool can write code that a computer can understand... The trick is to write code that humans can understand. [Martin Fowler http://www.martinfowler.com/distributedComputing/refactoring.pdf] |
|
From: Kopylenko, D. <dko...@ac...> - 2003-10-29 13:08:05
|
Hello everyone, Would it be a good idea to use JIRA for Spring project tracking? I just saw on their site that they have a free license for open source projects. What do you think? Regards, Dmitriy. |
|
From: Colin S. <col...@ex...> - 2003-10-28 15:45:37
|
I've updated easymock.jar in Spring from 1.0 to 1.0.1. It adds some minor enhancements. This upgrade does not appear to have affected broken any tests. Test previously and still broken (on my system) are: AttributeWriterTests CompilerTests FormatHelperTests Regards, Colin Colin Sampaleanu wrote: > > -------- Original Message -------- > Subject: [easymock] EasyMock 1.0.1 available > Date: Tue, 21 Oct 2003 01:45:01 +0200 > From: Tammo Freese <fr...@ac...> > Reply-To: eas...@ya... > To: eas...@ya... > > > > Hello all, > > I have uploaded EasyMock 1.0.1. Changes: > > - convenience methods expectAndReturn() and expectAndThrow() > (no JavaDoc yet, but tests and documentation) > > - numerous refactorings to open up EasyMock for extensions > (beware, all the internal stuff may change without notice) > > Please let me know whether you like the new convenience methods or not. > > - > Tammo > > PS I have done a short exploration to port the EasyMock class extension > (which Joel Shellman provided on the file section) to EasyMock 1.0.1. > If anyone is interested, please let me know. |
|
From: Cameron B. <ca...@da...> - 2003-10-27 16:48:27
|
Yeah, the autowire looks handy for those sort of cases.. I was just reading up on it today.. since I want to use it to autowire xwork actions... see my other post about this one. Cheers, Cameron Colin Sampaleanu wrote: > Not quite, but you can use Spring's autowire support. That is, your > mapper/dao beans in the app context would be set to autowire, and > could be fed the Session Factory instance without you actually having > to specify it. I generally don't use autowire, preferring to specify > dependencies directly, but in this case, when you might have 10-30 > mappers taking the same parameter, it should work nicely. Here's an > excerpt from the Spring app context dtd describing the autowire stuff: > > <!ATTLIST bean dependency-check (none|objects|simple|all) "none"> > > <!-- > Optional attribute controlling whether to "autowire" > bean properties. This is an automagical process in which bean > references > don't need to be coded explicitly in the XML bean definition file, > but Spring works out dependencies. > There are three modes: > 1. no > The traditional Spring default. No automagical wiring. Bean references > must be defined in the XML file via the <ref> element. We recommend > this > in most cases as it makes documentation more explicit. > 2. byName > Autowiring by property name. If a bean of class Cat exposes a dog > property, > Spring will try to set this to the value of the bean "dog" in the > current > factory. > 3. byType > This is like the PicoContainer default, in which there must be exactly > one bean of the property type in the bean factory. If there are 0 or > more than one, a fatal error is raised, and you can't use byType > autowiring for > that bean. > This makes bean factories simple to configure for small namespaces, > but doesn't work as well as standard Spring behaviour for > bigger applications. > Autowire behaviour can be combined with dependency checking, > which will > be performed after all auto wiring has been completed. > --> > <!ATTLIST bean autowire (no|byName|byType) "no"> > > > So in the case of using HibernateDaoSupport as a base for your > mappers, you would autowire (by explicit name or by type) the property > called 'sessionFactory' for those mappers (which they just inherit > from HibernateDaoSupport). > > Regards, > Colin > > > > Cameron Braid wrote: > >> Thanks for y our prompt reply. >> >> Yeah, that all makes sense. >> >> In regards to mapping for an abstract class - is it possible to >> specify a mapping that gets inherited automatically, based on the >> class hierarchy >> >> i.e. Map the HibernateDaoSupport.sessionFactory property to name >> "mySessionFactory", and then any class that extends >> HibernateDaoSupport inherit that mapping ? >> >> Thanks again. >> >> Cameron. >> >> Colin Sampaleanu wrote: >> >>> Cameron Braid wrote: >>> >>>> I am just beginning to use the Spring framework, and so far I am >>>> very impressed. >>>> >>>> One thing that I don't quite understand is the mandatory >>>> requirement for each DAO and BO (Business Object) to support the >>>> set/getSessionFactory method. >>>> >>>> The reason that I say it is mandatory is because the only way to >>>> obtain the current session (as far as I know) is to use >>>> SessionFactoryUtils.getSession(SessionFactory...). This means that >>>> each DAO/BO requires a setSessionFactory property to be able to be >>>> passed it from the spring container. This also requires that each >>>> DAO/BO to be configured to bind the SessionFactory instance within >>>> the applicationContext.xml >>>> >>>> What I would think would be a simple and quite common use case >>>> would be for an app to require only one session factory. Therefore >>>> I think that the SessionFactoryUtils, and related classes , could >>>> use a static field to store the 'default' session factory. >>>> >>>> Has something like this been considered ? >>>> Do you think that this is a good or a bad idea ? >>>> >>> Cameron, >>> >>> To clarify, your business objects would generally do not need to >>> have a setSessionFactory method. They would need setters for one or >>> more Mapper/DAO objects, and those Mapper/DAO objects would need the >>> setSessionFactory method. >>> >>> As for the idea of having the Mapper/DAO objects not need the >>> session factory parameter, and getting it from a singleton of some >>> sort, that approach would work for some use cases, but using a >>> singleton like this is just not very clean. It becomes harder to >>> test code in isolation, and usually locks you into the singleton >>> approach. >>> >>> You are at most going to declare each mapper/dao once in the >>> application context. Giving it the session factory paramter is not a >>> big deal. In terms of the actual code in the mapper/dao to support >>> this, this can be provided by an abstract base class, and in fact >>> Spring has such a class (for Hibernate) called HibernateDaoSupport. >>> >>> Regards, >>> Colin >> >> > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Colin S. <col...@ex...> - 2003-10-27 16:37:31
|
Not quite, but you can use Spring's autowire support. That is, your
mapper/dao beans in the app context would be set to autowire, and could
be fed the Session Factory instance without you actually having to
specify it. I generally don't use autowire, preferring to specify
dependencies directly, but in this case, when you might have 10-30
mappers taking the same parameter, it should work nicely. Here's an
excerpt from the Spring app context dtd describing the autowire stuff:
<!ATTLIST bean dependency-check (none|objects|simple|all) "none">
<!--
Optional attribute controlling whether to "autowire"
bean properties. This is an automagical process in which bean references
don't need to be coded explicitly in the XML bean definition file,
but Spring works out dependencies.
There are three modes:
1. no
The traditional Spring default. No automagical wiring. Bean references
must be defined in the XML file via the <ref> element. We recommend this
in most cases as it makes documentation more explicit.
2. byName
Autowiring by property name. If a bean of class Cat exposes a dog
property,
Spring will try to set this to the value of the bean "dog" in the
current
factory.
3. byType
This is like the PicoContainer default, in which there must be exactly
one bean of the property type in the bean factory. If there are 0 or
more than one, a fatal error is raised, and you can't use byType
autowiring for
that bean.
This makes bean factories simple to configure for small namespaces,
but doesn't work as well as standard Spring behaviour for
bigger applications.
Autowire behaviour can be combined with dependency checking, which will
be performed after all auto wiring has been completed.
-->
<!ATTLIST bean autowire (no|byName|byType) "no">
So in the case of using HibernateDaoSupport as a base for your mappers,
you would autowire (by explicit name or by type) the property called
'sessionFactory' for those mappers (which they just inherit from
HibernateDaoSupport).
Regards,
Colin
Cameron Braid wrote:
> Thanks for y our prompt reply.
>
> Yeah, that all makes sense.
>
> In regards to mapping for an abstract class - is it possible to
> specify a mapping that gets inherited automatically, based on the
> class hierarchy
>
> i.e. Map the HibernateDaoSupport.sessionFactory property to name
> "mySessionFactory", and then any class that extends
> HibernateDaoSupport inherit that mapping ?
>
> Thanks again.
>
> Cameron.
>
> Colin Sampaleanu wrote:
>
>> Cameron Braid wrote:
>>
>>> I am just beginning to use the Spring framework, and so far I am
>>> very impressed.
>>>
>>> One thing that I don't quite understand is the mandatory requirement
>>> for each DAO and BO (Business Object) to support the
>>> set/getSessionFactory method.
>>>
>>> The reason that I say it is mandatory is because the only way to
>>> obtain the current session (as far as I know) is to use
>>> SessionFactoryUtils.getSession(SessionFactory...). This means that
>>> each DAO/BO requires a setSessionFactory property to be able to be
>>> passed it from the spring container. This also requires that each
>>> DAO/BO to be configured to bind the SessionFactory instance within
>>> the applicationContext.xml
>>>
>>> What I would think would be a simple and quite common use case would
>>> be for an app to require only one session factory. Therefore I think
>>> that the SessionFactoryUtils, and related classes , could use a
>>> static field to store the 'default' session factory.
>>>
>>> Has something like this been considered ?
>>> Do you think that this is a good or a bad idea ?
>>>
>> Cameron,
>>
>> To clarify, your business objects would generally do not need to have
>> a setSessionFactory method. They would need setters for one or more
>> Mapper/DAO objects, and those Mapper/DAO objects would need the
>> setSessionFactory method.
>>
>> As for the idea of having the Mapper/DAO objects not need the session
>> factory parameter, and getting it from a singleton of some sort, that
>> approach would work for some use cases, but using a singleton like
>> this is just not very clean. It becomes harder to test code in
>> isolation, and usually locks you into the singleton approach.
>>
>> You are at most going to declare each mapper/dao once in the
>> application context. Giving it the session factory paramter is not a
>> big deal. In terms of the actual code in the mapper/dao to support
>> this, this can be provided by an abstract base class, and in fact
>> Spring has such a class (for Hibernate) called HibernateDaoSupport.
>>
>> Regards,
>> Colin
>
|
|
From: Cameron B. <ca...@da...> - 2003-10-27 16:18:09
|
Thanks for y our prompt reply. Yeah, that all makes sense. In regards to mapping for an abstract class - is it possible to specify a mapping that gets inherited automatically, based on the class hierarchy i.e. Map the HibernateDaoSupport.sessionFactory property to name "mySessionFactory", and then any class that extends HibernateDaoSupport inherit that mapping ? Thanks again. Cameron. Colin Sampaleanu wrote: > Cameron Braid wrote: > >> I am just beginning to use the Spring framework, and so far I am very >> impressed. >> >> One thing that I don't quite understand is the mandatory requirement >> for each DAO and BO (Business Object) to support the >> set/getSessionFactory method. >> >> The reason that I say it is mandatory is because the only way to >> obtain the current session (as far as I know) is to use >> SessionFactoryUtils.getSession(SessionFactory...). This means that >> each DAO/BO requires a setSessionFactory property to be able to be >> passed it from the spring container. This also requires that each >> DAO/BO to be configured to bind the SessionFactory instance within >> the applicationContext.xml >> >> What I would think would be a simple and quite common use case would >> be for an app to require only one session factory. Therefore I think >> that the SessionFactoryUtils, and related classes , could use a >> static field to store the 'default' session factory. >> >> Has something like this been considered ? >> Do you think that this is a good or a bad idea ? >> > Cameron, > > To clarify, your business objects would generally do not need to have > a setSessionFactory method. They would need setters for one or more > Mapper/DAO objects, and those Mapper/DAO objects would need the > setSessionFactory method. > > As for the idea of having the Mapper/DAO objects not need the session > factory parameter, and getting it from a singleton of some sort, that > approach would work for some use cases, but using a singleton like > this is just not very clean. It becomes harder to test code in > isolation, and usually locks you into the singleton approach. > > You are at most going to declare each mapper/dao once in the > application context. Giving it the session factory paramter is not a > big deal. In terms of the actual code in the mapper/dao to support > this, this can be provided by an abstract base class, and in fact > Spring has such a class (for Hibernate) called HibernateDaoSupport. > > Regards, > Colin > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Colin S. <col...@ex...> - 2003-10-27 16:05:38
|
Cameron Braid wrote: > I am just beginning to use the Spring framework, and so far I am very > impressed. > > One thing that I don't quite understand is the mandatory requirement > for each DAO and BO (Business Object) to support the > set/getSessionFactory method. > > The reason that I say it is mandatory is because the only way to > obtain the current session (as far as I know) is to use > SessionFactoryUtils.getSession(SessionFactory...). This means that > each DAO/BO requires a setSessionFactory property to be able to be > passed it from the spring container. This also requires that each > DAO/BO to be configured to bind the SessionFactory instance within the > applicationContext.xml > > What I would think would be a simple and quite common use case would > be for an app to require only one session factory. Therefore I think > that the SessionFactoryUtils, and related classes , could use a static > field to store the 'default' session factory. > > Has something like this been considered ? > Do you think that this is a good or a bad idea ? > Cameron, To clarify, your business objects would generally do not need to have a setSessionFactory method. They would need setters for one or more Mapper/DAO objects, and those Mapper/DAO objects would need the setSessionFactory method. As for the idea of having the Mapper/DAO objects not need the session factory parameter, and getting it from a singleton of some sort, that approach would work for some use cases, but using a singleton like this is just not very clean. It becomes harder to test code in isolation, and usually locks you into the singleton approach. You are at most going to declare each mapper/dao once in the application context. Giving it the session factory paramter is not a big deal. In terms of the actual code in the mapper/dao to support this, this can be provided by an abstract base class, and in fact Spring has such a class (for Hibernate) called HibernateDaoSupport. Regards, Colin |
|
From: Cameron B. <ca...@da...> - 2003-10-27 11:51:24
|
I am just beginning to use the Spring framework, and so far I am very impressed. One thing that I don't quite understand is the mandatory requirement for each DAO and BO (Business Object) to support the set/getSessionFactory method. The reason that I say it is mandatory is because the only way to obtain the current session (as far as I know) is to use SessionFactoryUtils.getSession(SessionFactory...). This means that each DAO/BO requires a setSessionFactory property to be able to be passed it from the spring container. This also requires that each DAO/BO to be configured to bind the SessionFactory instance within the applicationContext.xml What I would think would be a simple and quite common use case would be for an app to require only one session factory. Therefore I think that the SessionFactoryUtils, and related classes , could use a static field to store the 'default' session factory. Has something like this been considered ? Do you think that this is a good or a bad idea ? Cheers, Cameron. |
|
From: Cameron B. <ca...@da...> - 2003-10-27 11:42:07
|
Is there any way that the auto wire support could be exposed through a public API to allow it to be used outside of the RootBeanDefinition class. I am trying to implement a Xwork Interceptor that auto wires an action's properties that are components. Currently I am able to manually wire them by specifying an "action property name" to "spring component name" mapping in the xwork interceptor, now I wish to be able to auto wire them by calling something like appContext.autoWireByName(action) Cheers, Cameron. |
|
From: Alef A. \(JTeam\) <al...@jt...> - 2003-10-27 10:07:05
|
I talked it over and the callback seems like a good idea, it removes the
need for doing the super.newSessionFactory call in the first solution.
=20
I'll add it...
=20
alef
=20
-----Oorspronkelijk bericht-----
Van: spr...@li...
[mailto:spr...@li...] Namens
j=FCrgen h=F6ller [werk3AT]
Verzonden: Friday, October 24, 2003 1:08 PM
Aan: spr...@li...
Onderwerp: RE: [Springframework-developer] LocalSessionFactory
afterPropertiesSet() =3D final
Alef,
=20
I'd like to keep the final afterPropertiesSet -- it's too easy to break
superclass functionality if overriding that and not properly doing super
calls. Currently, you could override newSessionFactory a la:
=20
protected SessionFactory newSessionFactory(Configuration config) {
// add the mapping resources programmatically
config.addResource("myMappingResource",
Thread.currentThread().getContextClassLoader());
return super.newSessionFactory(config);
}
=20
Of course, it might make sense to introduce a separate post-processing
callback, to be invoked by the standard afterPropertiesSet method right
before the newSessionFactory call:
=20
protected void postProcessConfiguration(Configuration config) {
// add the mapping resources programmatically
config.addResource("myMappingResource",
Thread.currentThread().getContextClassLoader());
}
=20
What do you think? I guess such a call back wouldn't hurt anyone, and it
is easier to override for post-processing purposes.
=20
Juergen
=20
=20
-----Original Message-----
From: Alef Arendsen (JTeam) [mailto:al...@jt...]
Sent: Thursday, October 23, 2003 2:50 PM
To: 'Spring Developers'
Subject: [Springframework-developer] LocalSessionFactory
afterPropertiesSet() =3D final
Juergen,=20
Right now the LocalSessionFactory in the Hibernate package has a final
afterPropertiesSet()-method. We'd like to extend the factory in order to
collect mapping files from different sources instead of the fixed
property 'mappingResources'. Then of course we need to override
afterPropertiesSet() to set the mappingResources on the superclass and
then call super.afterPropertiesSet(). However, like I said, the
afterPropertiesSet() method from LocalSessionFactory is final.
Any objections to 'de-finalizing' this method?=20
Thanx,=20
Alef=20
P.s. getting into the hibernate stuff here, looks good :)=20
=3D=3D=20
JTeam B.V.=20
Donker Curtiusstraat 7-412=20
1051 JL Amsterdam=20
T: +31 20 486 20 36=20
M: +31 6 24 11 1996=20
F: +31 84 837 00 00=20
E: al...@jt...=20
W: <http://www.jteam.nl> http://www.jteam.nl=20
|
|
From: Rod J. <rod...@in...> - 2003-10-27 07:26:15
|
It's changed. R ----- Original Message ----- From: "Trevor Cook" <pr...@se...> To: <spr...@li...> Sent: Monday, October 27, 2003 1:45 AM Subject: RE: [Springframework-developer] StaticMethodPointcut > +1 > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Rod Johnson > Sent: October 24, 2003 8:44 AM > To: spr...@li... > Subject: [Springframework-developer] StaticMethodPointcut > > > Guys, > > I think we should change the signature on the StaticMethodPointcut applies() > method to introduce a new argument, targetClass, as below: > > boolean applies(Method method, Class targetClass, AttributeRegistry > attributeRegistry); > > The reason is that sometimes we need to know not just the method, but the > target class we're invoking. > > Consider the getAge() method on class TestBean. A subclass, SpecialTestBean > adds a class-level metadata attribute that should cause auto-proxying. With > the old signature, the method argument would be TestBean.getAge() and > without knowledge of the target class we would miss this important > attribute. > > Does everyone agree this makes sense? Is there a better solution? > > This will break existing static pointcuts, although it's trivial to fix. > I've already revised the source and test tree (although not committed yet). > Hence I didn't commit it before M2. > > Regards, > Rod > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.530 / Virus Database: 325 - Release Date: 22/10/2003 > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation Program. > Do you like what SourceForge.net is doing for the Open > Source Community? Make a contribution, and help us add new > features and functionality. Click here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Trevor C. <pr...@se...> - 2003-10-27 01:49:49
|
+1 -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Rod Johnson Sent: October 24, 2003 8:44 AM To: spr...@li... Subject: [Springframework-developer] StaticMethodPointcut Guys, I think we should change the signature on the StaticMethodPointcut applies() method to introduce a new argument, targetClass, as below: boolean applies(Method method, Class targetClass, AttributeRegistry attributeRegistry); The reason is that sometimes we need to know not just the method, but the target class we're invoking. Consider the getAge() method on class TestBean. A subclass, SpecialTestBean adds a class-level metadata attribute that should cause auto-proxying. With the old signature, the method argument would be TestBean.getAge() and without knowledge of the target class we would miss this important attribute. Does everyone agree this makes sense? Is there a better solution? This will break existing static pointcuts, although it's trivial to fix. I've already revised the source and test tree (although not committed yet). Hence I didn't commit it before M2. Regards, Rod ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.530 / Virus Database: 325 - Release Date: 22/10/2003 |
|
From: Cameron B. <ca...@da...> - 2003-10-26 09:13:36
|
I am cross posting this message because it is a response to one on the
Spring Framework list, and it is more WebWork/Xwork related.
I was thinking of doing a similiar thing as outlined below, but instead
of introducing a new <external-ref> tag into the xwork.xml config files,
I was going to do it with an interceptor.
Therefore I would configure the interceptor using <params to tell it
which component names map to which action properties.
<action name="Bar" class="mypackage.MyAction">
<param name="foo">17</param>
<interceptor-ref name="springContainer">
<param name="dataSource">myDataSource</param>
</interceptor-ref>
</action>
I do like the idea of supporting an external-ref type syntax, if other
people think it is a better idea.
Cheers,
Cameron
On Sun, 2003-10-26 at 04:09, jürgen höller [werk3AT] wrote:
> Hi Matthew,
>
> I suggest to add the "external-ref" tag to the XWork XML file itself, just like the existing "param" tag. This is basically an inversion of the current XWork component approach -- "pulling" in named component instances instead of "pushing" them to the actions.
>
> <action name="Bar" class="mypackage.MyAction">
> <param name="foo">17</param>
> <external-ref name="bar">myDataSource</external-ref>
> </action>
>
> The MyAction class could look as follows. Note that there's no enabler interface involved; the bean property and thus the setter is determined via external-ref´s "name" attribute, just like with the param tag.
>
> public class MyAction implements Action {
> private DataSource dataSource;
> public void setDataSource(DataSource dataSource) {
> this.dataSource = dataSource;
> }
> ...
> }
>
> As this involves support in the XWork XML file, the XWork action processor will need to implement the external-ref resolution itself instead of an interceptor like ComponentInterceptor. It could delegate the actual resolution to an ExternalReferenceResolver strategy:
>
> public interface ExternalReferenceResolver {
> Object resolveReference(String name);
> }
>
> In case of WebWork2 being the XWork environment, ServletDispatcher could determine the ExternalReferenceResolver implementation class name from a servlet init-param. The Spring implementation for a web environment would simply retrieve the root web application context via the ServletContext then, possibly receiving the latter via a ServletContextAware interface.
>
> public class SpringServletContextReferenceResolver implements ExternalReferenceResolver, ServletContextAware {
> private void ApplicationContext applicationContext;
> public void setServletContext(ServletContext servletContext) {
> this.applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
> }
> public Object resolveReference(String name) {
> return this.applicationContext.getBean(name);
> }
> }
>
> The Spring root web application context would be loaded on startup via Spring's ContextLoaderListener, as usual. Spring/WebWork2 web apps would thus just use Spring's typical "WEB-INF/applicationContext.xml" for defining middle tier resources and business objects plus XWork's "xwork.xml" for defining use-case-driven actions. There´s no "components.xml" involved, except if the web app uses XWork's scoped components mechanism too. That would keep configuration simple and concise enough for typical needs.
>
> The Spring application context will always be an application-level singleton. In a WebWork2 combo, there are no nested application contexts from a Spring web MVC DispatcherServlet involved -- WebWork2 serves as web MVC framework then. Note that an application context can create either singleton beans or new instances from a prototype, configurable via the bean definition. The external reference mechanism above would not need to be concerned with that distinction, it could transparently work with both kinds; but typical middle tier objects are almost always singletons anyway.
>
> A non-web XWork dispatcher could be configured with a different Spring resolver implementation, using a ClassPathXmlApplicationContext instead of a preloaded XmlWebApplicationContext. It would look for an "applicationContext.xml" resource in the root of the class path.
>
> public class SpringClassPathReferenceResolver implements ExternalReferenceResolver {
> private void ApplicationContext applicationContext;
> public SpringClassPathReferenceResolver() {
> this.applicationContext = new ClassPathXmlApplicationContext("/applicationContext.xml");
> }
> public Object resolveReference(String name) {
> return this.applicationContext.getBean(name);
> }
> }
>
> The whole concept is pretty orthogonal to XWork's existing scoped component approach. For example, a webshop could leverage an XWork component for a session-scoped shopping cart *and* Spring-managed business objects for loading product information and for turning that shopping cart into a persistent order.
>
> BTW, an ad-hoc solution for accessing a Spring root web application context from a WebWork action could be to make the action HttpServletRequestAware and do the application context lookup manually. That would work without special support, even on WebWork1.
>
> ...
> ServletContext servletContext = request.getSession().getServletContext();
> ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
> MyBusinessObject businessObject = (MyBusinessObject) applicationContext.getBean("myBusinessObject");
> ...
>
> Of course, an external reference resolver solution would be way preferable because it allows the actions to receive references to business objects via simple bean property setters of the business object type; no custom lookup code and especially no web dependencies in the actions necessary.
>
> What do you think? Do you see a different option for integration? I'm not keen on letting Spring touch the XWork action instances directly; that would involve double definitions in both xwork.xml and applicationContext.xml. components.xml isn't a good integration point either, as it would involve double definitions too. I believe that my proposal is straightforward and intuitive, as it applies a similar notation for both action params and external references. Of course, it introduces a new concept to xwork.xml -- but I believe a powerful and generic one.
>
> Juergen
>
>
> -----Ursprüngliche Nachricht-----
> Von: Matthew E. Porter [mailto:ma...@me...]
> Gesendet: Fr 24.10.2003 22:23
> An: jürgen höller [werk3AT]
> Cc:
> Betreff: Re: XWork/Spring integration
>
>
> Jüergen:
> I may start working on the spring-ww2 integration this weekend if I
> get some time. I have some questions about this proposal and how the
> system will work. Please forgive me if these questions seem
> rudimentary, as I am still learning Spring.
> Are you talking about adding the "external-ref" tag to
> components.xml? In this case, I would assume it would replace the 3
> scope concept in XW with Spring's application and Web-MVC scope. Or am
> I just wrong? How would Actions be wired in?
>
>
> Cheers,
> matthew
>
> On Thursday, October 9, 2003, at 12:16 PM, jürgen höller [werk3AT]
> wrote:
>
> > Matthew, Mike,
> >
> > Hmmm, I'm not always too keen in terms of perception... anyway: Hi
> > Matthew, I don't think I can to tell you anything about Conductor that
> > you wouldn't already know ;-)
> >
> > In terms of effort, I expect my XWork proposal to be pretty
> > straightforward to implement: It's basically just about introducing
> > the "external-ref" tag and an "ExternalReferenceResolver" interface
> > that the tag delegates to. A Spring implementation of that interface
> > should be easy to do too: Load the application context in some init
> > method, and resolve the references as bean names in the context.
> >
> > The only issue is where to load the application context from: If this
> > should be possible from the WEB-INF directory, we would need a
> > reference to the ServletContext in the SpringReferenceResolver
> > implementation. Else, we could use ClassPathXmlApplicationContext to
> > load the XML file from the class path: This would not involve anything
> > special at all.
> >
> > So in fact, the interface would need an init method:
> >
> > public interface ExternalReferenceResolver {
> > void init();
> > Object resolveReference(String name);
> > }
> >
> > A Spring implementation could look as follows:
> >
> > public class SpringReferenceResolver implements
> > ExternalReferenceResolver {
> > private ApplicationContext applicationContext;
> > public void init() {
> > applicationContext = new
> > ClassPathXmlApplicationContext("/spring-context.xml");
> > }
> > public Object resolveReference(String name) {
> > return applicationContext.getBean(name);
> > }
> > }
> >
> > It doesn't need to be more complicated than this. We would just need
> > to introduce such external reference hooks in XWork. I do not consider
> > an "external-ref" tag as much extra XML; and it's easy to specify
> > references to specific bean instances with it. What do you think?
> >
> > Juergen
> >
> >
> > -----Original Message-----
> > From: jürgen höller [werk3AT]
> > Sent: Thursday, October 09, 2003 6:33 PM
> > To: Matthew E. Porter
> > Cc: spr...@li...;
> > spr...@li...
> > Subject: [Springframework-developer] RE: [Springframework-user]
> > Introduction and Hibernate-Spring queries
> >
> >
> > Not yet. Maybe Mike can comment on a timeframe, although Jason might
> > be the one that actually works on it. Note that this plan is not fixed
> > at all; currently, XWork has its own enable-interface-centric simple
> > IoC support. I'm just "consulting" on this issue; Mike, Jason, and the
> > other XWork guys will have to decide on what to adopt in the end.
> >
> > Juergen
> >
> >
> > -----Original Message-----
> > From: Matthew E. Porter [mailto:ma...@me...]
> > Sent: Thursday, October 09, 2003 6:31 PM
> > To: jürgen höller [werk3AT]
> > Cc: spr...@li...;
> > spr...@li...
> > Subject: Re: [Springframework-user] Introduction and Hibernate-Spring
> > queries
> >
> >
> > Has any work (i.e. code) been done on this?
> >
> >
> > Cheers,
> > matthew
> >
> > On Thursday, October 9, 2003, at 11:15 AM, jürgen höller [werk3AT]
> > wrote:
> >
> >> Matthew, everybody,
> >>
> >> My XWork/Spring integration proposal is no secret -- here it is, cut
> >> from a recent mail to Jason and Mike. We've been discussing IoC
> >> options for XWork/Conductor for quite a while, mainly in terms of
> >> PicoContainer vs Spring.
> >>
> >> <quote>
> >>
> >> As far as I see, the XWork config file supports setting bean
> >> properties as parameters on actions like this:
> >>
> >> <action name="Bar" class="com.opensymphony.xwork.SimpleAction">
> >> <param name="foo">17</param>
> >> <param name="bar">23</param>
> >> </action>
> >>
> >> This is obviously pretty similar to a Spring bean definition, just
> >> specific for a WebWork action. A significant difference is that the
> >> Spring property tag can tag either a value tag or a ref tag within,
> >> i.e. either specify a parameter value or a´dependency on another bean.
> >>
> >> Currently, I see the easiest way of accessing a Spring context from
> >> XWork via a tag that resolves an external component reference, a la:
> >>
> >> <action name="Bar" class="com.opensymphony.xwork.SimpleAction">
> >> <param name="foo">17</param>
> >> <external-ref name="bar">myDataSource</external-ref>
> >> </action>
> >>
> >> XWork could fetch the Spring context then, look up the bean named
> >> "myDataSource", and set the reference into the "bar" bean property of
> >> the "Bar" action. This would be intuitive, as it works analogously to
> >> setting a parameter value, and flexible, as it allows to reference any
> >> specific instance. Effectively, you would be accessing beans in a
> >> Spring middle tier context rather than letting Spring touch your
> >> action instances - but that's not a disadvantage, rather a clean
> >> separation of responsibilities.
> >>
> >> Of course, the Spring support for such external references can be
> >> pluggable in XWork, potentially replacing the current ComponentManager
> >> mechanism with its enabler interfaces. Any such resolver for external
> >> references would simply need to return an object for the given
> >> symbolic name. The interface could look like this:
> >>
> >> public interface ExternalReferenceResolver {
> >> Object resolveReference(String name);
> >> }
> >>
> >> A Spring implementation would grab a reference to the Spring
> >> application context and call getBean with the given name. The
> >> application context itself could get initialized on XWork startup,
> >> initializing its singletons upfront. I consider such an XWork/Spring
> >> integration as pretty simple but very powerful: no enabler interfaces,
> >> just bean properties with component types, and an external-ref tag in
> >> addition to the param tag.
> >>
> >> </quote>
> >>
> >> Juergen
> >>
> >>
> >> -----Original Message-----
> >> From: Matthew E. Porter [mailto:ma...@me...]
> >> Sent: Thursday, October 09, 2003 4:16 PM
> >> To: jürgen höller [werk3AT]
> >> Subject: Re: [Springframework-user] Introduction and Hibernate-Spring
> >> queries
> >>
> >>
> >>>
> >>> Throwing in Spring as middle tier glue is a good idea, of course :-)
> >>> Have you already thought about my proposal regarding XWork/Spring
> >>> integration from some days ago? Finally, we're of course open for any
> >>> suggestions and enhancement requests on the Spring side of things!
> >>>
> >>
> >> I this proposal in the public space. I would also like to see
> >> XW/WW2-Spring integration in the near term future.
> >>
> >>
> >> Cheers,
> >> matthew
> >>
> >
> >
> >
> > -------------------------------------------------------
> > 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
> > _______________________________________________
> > Springframework-developer mailing list
> > Spr...@li...
> > https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
> NHY隊X'u䅝CvϮ+j`ʋGRxZ++)~zt
> xƤy(nbvvuޱ~ܶ*'jX)brH^mqzݢv{)~{
> +ׯzZ)zXX*kxuޖ^X(~zwilqzlX)ߣ))~{
> +ׯzZ)
|
|
From: Colin S. <col...@ex...> - 2003-10-25 20:20:28
|
Black hole might not be the most appropriate term (messages are getting out eventually), but there have been some seriously large delays in delivering messages to the lists during the last week. I wrote the message below 3 days ago, and it only appeared in my inbox now... Colin Sampaleanu wrote: > Matthew E. Porter wrote: > >> On Wednesday, October 22, 2003, at 10:18 AM, Colin Sampaleanu wrote: >> >>> Matthew E. Porter wrote: >>> >>>> Greetings. I am testing the Spring framework with a WW2+Hibernate >>>> web application currently being developed. When initially >>>> deploying this application, the deployer is prompted with settings >>>> to configure the database settings- specifically, the Hibernate >>>> settings. At that point, the hibernate.cfg.xml is written and >>>> Hibernate is loaded. >>>> >>>> From what I can tell, Spring prefers this information being written >>>> in the applicationContext.xml file and is tied to the entire >>>> container. What is the best method for accomplishing something >>>> similar? >>> >>> >>> Actually Spring (LocalSessionFactoryBean for example) has no problem >>> using hibernate.cfg.xml as a source for settings. There are indeed >>> lifecycle issues in your usage scenario though. >>> >>> The container normally creates singleton beans immediately (that is, >>> when the container loads), so that normally LocalSessionFactoryBean >>> would be created at that time, and would need it's parameters >>> (whether or not some data is coming from an external >>> hibernate.cfg.xml file is irrelevant). >> >> >> That was my experience; however, being a newbie to Spring, I wanted >> confirmation. >> >>> How is the deployer prompted for the params that are needed? Is this >>> done only on the first usage after a new deploy? >> >> >> The deployer is prompted for the settings when the initially access >> the application in the browser. It should only been once, right >> after a new deploy. >> >> Do you see a way to work around this? > > > That's a bit of a toughie. (Spring aside, changing something like a > datasource which is bound to JNDI is going to be hard to do in any > J2EE container environment, since the J2EE container is actually > setting up that datasource). > > One approach which might be made to work would be to assemble the > Spring context from multiple XML files (this capability is currently > available in CVS, the 1.0M1 release can only do nested contexts, which > are not quite the same thing). So the app would start up using a > context which didn't include the info needed to be configured (but > which presumably isn't needed for prompting the deployer, either), > prompt the deployer for the information, then write out the proper > Spring context xml file which needs to be customized. Then the app > would restart itself, and build the context from all the xml files > including the one that had been written. > > The mehanism of how to do a restart bit is somewhat iffy, in that it > would probably have to be servlet container specific, that is, you > would restart the webapp in a container specific fashion. > > Your alternative of course, is to do the configuration as part of the > deployment process, which is what most people do. > > Regards, > Colin |
|
From: Chris N. <ch...@si...> - 2003-10-25 19:34:06
|
Mark Pollack wrote: > I think the "side" file approach is also valid...it really tends to be a > matter of taste. I believe the JSR175 committe also debated long and > hard about where to put the attributes and ended up putting it in the > bytecode. > > I'm curious if CGLIB would behave the way suggested. I'm pretty sure it would ;-) > Java already stores > a custom attribute in the bytecode, the 'depreacted' attribute. CGLIB > might strip this out as well. It needs some investigation, I'll look > into it. If it does strip out attributes there are probably implications > for jdk1.5 based code. It's more of a function of the underlying ASM library that CGLIB uses. In its current incarnation it does not pass along attribute info when reading a class, so there is no way for the data to make it into the generated class. You are right that this will have to change in order to support the JDK 1.5 stuff. I've been meaning to get into this issue soon. > The side-file approach does feel better to people, those who typically > dislike anything touching their bytecode and it does mean you don't have > to copy the bcel.jar into ANT_HOME/lib, so it feels more lightweight. When ASM has attribute support added, I think it could be appropriate to have a JSR175-compatible metadata compiler as part of CGLIB, so if you're using Spring you wouldn't have any additional dependencies (currently CGLIB+ASM is less than half the size of BCEL alone). Chris |
|
From: <jue...@we...> - 2003-10-25 18:19:04
|
SGkgTWF0dGhldywgDQoNCkkgc3VnZ2VzdCB0byBhZGQgdGhlICJleHRlcm5hbC1yZWYiIHRhZyB0 byB0aGUgWFdvcmsgWE1MIGZpbGUgaXRzZWxmLCBqdXN0IGxpa2UgdGhlIGV4a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xvcGVyQGxp c3RzLnNvdXJjZWZvcmdlLm5ldCANCj4gaHR0cHM6Ly9saXN0cy5zb3VyY2Vmb3JnZS5uZXQvbGlz dHMvbGlzdGluZm8vc3ByaW5nZnJhbWV3b3JrLWRldmVsb3BlciANCg0K |
|
From: Rod J. <rod...@in...> - 2003-10-25 15:20:48
|
Juergen, I think we should provide indexed property support for M3. I think you were right to remove the inadequate support for now. I think supporting the Commons syntax makes sense. I think at one point I envisaged having an IndexedPropertyValue class, but that's probably unnecessary. Regards, Rod -----Original Message----- From: jürgen höller [werk3AT] Sent: Thursday, October 23, 2003 4:50 PM To: spr...@li... Subject: FW: [springframework - Help] Index properties in forms Everybody, Seems like we've got two people inquiring for indexed property support. The second already dates back to mid-September :-( I've just rechecked the BeanWrapper implementation and discovered that there is no proper support for indexed properties yet. The existing getIndexedProperty method was not complete (e.g. no support for nesting) and untested (no unit test covered it), so I've decided to remove it for the time being (for 1.0 M2). It just confused both of those guys that were looking for indexed property support. Jakarta Commons BeanUtils does support nested and mapped properties, quoting from the javadocs of their PropertyUtils class: <quote> For the purposes of this class, five formats for referencing a particular property value of a bean are defined, with the layout of an identifying String in parentheses: * Simple (name) - The specified name identifies an individual property of a particular JavaBean. The name of the actual getter or setter method to be used is determined using standard JavaBeans instrospection, so that (unless overridden by a BeanInfo class, a property named "xyz" will have a getter method named getXyz() or (for boolean properties only) isXyz(), and a setter method named setXyz(). * Nested (name1.name2.name3) The first name element is used to select a property getter, as for simple references above. The object returned for this property is then consulted, using the same approach, for a property getter for a property named name2, and so on. The property value that is ultimately retrieved or modified is the one identified by the last name element. * Indexed (name[index]) - The underlying property value is assumed to be an array, or this JavaBean is assumed to have indexed property getter and setter methods. The appropriate (zero-relative) entry in the array is selected. List objects are now also supported for read/write. You simply need to define a getter that returns the List * Mapped (name(key)) - The JavaBean is assumed to have an property getter and setter methods with an additional attribute of type java.lang.String. * Combined (name1.name2[index].name3(key)) - Combining mapped, nested, and indexed references is also supported </quote> The question is: When and how to we add support for indexed and mapped properties? I guess that if we do, we should adopt the Commons BeanUtils style of specifying property paths for index and map access. This means that we wouldn't need additional methods in the BeanWrapper interface but rather just support for respective property paths in the BeanWrapperImpl implementation. Any thoughts on this? I've completely forgotten about these things in face of all the enterprise stuff we've been addressing lately ;-) Juergen https://sourceforge.net/forum/message.php?msg_id=2251775 By: breidenr I am using a SimpleFormController to help create an object using an HTTP form. Obviously, if my form object is a Vendor, that object has a setName(String) method, and my HTTP form has a field named "name", the Controller will try call Vendor.setName(String) and pass in the value from the form. This also goes for nested properties: address.setCity -> vendor.getAddress().setCity(String). My question is, is there any support for *indexed* properties? By that, I mean purchaseOrder[0].number -> ( (PurchaseOrder) vendor.getPurchaseOrders().get(0)).setNumber(). I know that some expression languages support something like this. IIRC, Struts has something like this, but it has a little kludgy. From what I can tell, nested porperies are supported by the Spring BeanWrapperImpl, but that is it. If this is correct and I want to implement nested properties, any suggestion as to the best route. Thanks. Ryan Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=2193984 By: hogie Hi, If I have a command object that stores a collection and I want the data binder to populate that collection from the servlet request, how should I name the parameters in my servlet request? In Struts I can do field[index], but I can't see if the same is possible in Spring. I see BeanWrapper.getIndexedPropertyValue() , but no set() equivalent. Many thanks, Mike. |
|
From: Colin S. <col...@ex...> - 2003-10-25 13:54:00
|
Actually OGNL has no dependencies on any servlet classes. It's designed
specifically to be embeeded in other products/libs.
The size and the fact that you are adding another dependency is
obviously an issue though. Any way you slice it though, you are going to
end up adding code to add the same functionality. In this respect, I am
starting to be more of a fan of getting something pluggable in there.
Perhaps it could use a quasi namespace prefix to pick the
implementation, e.g.:
ognl:expression
anotherel:expression
expression (default implementation?)
Regards,
Colin
jürgen höller [werk3AT] wrote:
>Peter,
>
>I tend to agree that JSP EL syntax is preferable, although we are not talking about a web-specific thing here. We have to build this into BeanWrapperImpl in any case, as we need to do lookups of custom property editors etc to provide the same level of functionality as for current nested properties. I doubt that we could reuse any existing EL implementation for this, as they all work on a JSP PageContext. Generally, we should try to avoid any additional dependencies for the core bean factory.
>
>Juergen
>
>
>-----Original Message-----
>From: Peter den Haan [mailto:pe...@de...]
>Sent: Friday, October 24, 2003 1:25 AM
>To: spr...@li...
>Subject: [[W3-SPAM]] - Re: [Springframework-developer] FW:
>[springframework - Help] Index properties in forms - Email found in
>subject
>
>
>
>Juergen wrote:
>
>
>
>>The question is: When and how to we add support for indexed and mapped
>>
>>
>properties?
>
>
>>I guess that if we do, we should adopt the Commons BeanUtils style of
>>
>>
>specifying property
>
>
>>paths for index and map access.
>>
>>
>
>I disagree. I feel we should use (a subset of) the JSTL Expression Language
>(EL) syntax as our starting point rather than BeanUtils style syntax. Please
>consider that this EL will be part of JSP itself as of version 2.0 of the
>spec; why introduce another language into the mix? If in a JSP you say
>${foo.bar}, shouldn't you be able to name the corresponding field foo.bar
>rather than foo(bar)?
>
>For simple and indexed properties, users won't notice any difference anyway.
>The most important differences are that the precise meaning of a[b] is
>determined by whether "a" evaluates to a List or a Map, and that a.b is
>fully equivalent to a["b"]. BeanUtils-style mapped properties (i.e. a(b))
>aren't part of the EL; they could be supported in a compatible way but IMHO
>stick with core JavaBeans stuff -- do this only if we can come up with a
>compelling use case for it.
>
>And if this is being refactored anyway, it's probably worth taking a look at
>what would be involved in making the EL implementation pluggable.
>
> - Peter
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: The SF.net Donation Program.
>Do you like what SourceForge.net is doing for the Open
>Source Community? Make a contribution, and help us add new
>features and functionality. Click here: http://sourceforge.net/donate/
>
>
|
|
From: Colin S. <col...@ex...> - 2003-10-25 13:45:54
|
+1 Rod Johnson wrote: >Guys, > >I think we should change the signature on the StaticMethodPointcut applies() >method to introduce a new argument, targetClass, as below: > >boolean applies(Method method, Class targetClass, AttributeRegistry >attributeRegistry); > >The reason is that sometimes we need to know not just the method, but the >target class we're invoking. > >Consider the getAge() method on class TestBean. A subclass, SpecialTestBean >adds a class-level metadata attribute that should cause auto-proxying. With >the old signature, the method argument would be TestBean.getAge() and >without knowledge of the target class we would miss this important >attribute. > >Does everyone agree this makes sense? Is there a better solution? > >This will break existing static pointcuts, although it's trivial to fix. >I've already revised the source and test tree (although not committed yet). >Hence I didn't commit it before M2. > >Regards, >Rod > > |