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: Seth L. <se...@eh...> - 2004-03-11 00:33:13
|
> Is anyone using Commons Attributes for declarative tx mgt (as in jPetStore > /attributes)? Not yet, though might when I start using Spring for txn management. > > Or the commons attributes handler mapping? Not yet, but will very shortly. I find that type of markup useful except for the view mappings. We develop some complicated workflows and the "success" view is calculated, so we can't predefine that. But the other types of attributes for a Controller will come in very handy. Are there some examples of the handler/controller attributes? Seth |
|
From: Rod J. <rod...@in...> - 2004-03-11 00:18:05
|
> I'm glad to learn we can shorten the attribute declarations by leaving > off the package. Very nice! That was actually my suggestion, based on Mark's attrib4j. I also requested the support for JavaBean properties, to make it easier to use with Spring. Is anyone using Commons Attributes for declarative tx mgt (as in jPetStore /attributes)? Or the commons attributes handler mapping? Regards, Rod |
|
From: Seth L. <se...@eh...> - 2004-03-11 00:08:07
|
> I suggest that you avoid using the same attribute class for all rules,
> and instead use a type hierarchy :
>
> For example instead of using
>
> @@ValidationRule("range", "minimum=0.0, maximum=100,000.0")
>
> Have a RangeValidationRule class and do this :
>
> @@RangeValidationRule(minimum=0.0, maximum=100000.0)
>
> I think this is better than
>
> @@ValidationRule("range", new NumberRange(0.0, 100,000.0))
Thanks Cameron! That was a great explanation.
I agree with Cameron on the above. I like a type hierarchy much better
than string identifiers. I'm not sure they buy us much, other than
another mapping configuration.
I'm glad to learn we can shorten the attribute declarations by leaving
off the package. Very nice!
Thanks,
Seth
|
|
From: Cameron B. <ca...@da...> - 2004-03-10 23:51:08
|
First of all a short description of commons attributes :
Commons attributes is quite flexable because it converts the attribute
declarations into a source class, which you then compile with your
application.
This allows you to use any java code in the declaration of the attribute.
The technique for not using the fully qualified class name is to specify all
package imports in the attributes-compiler ant task call.
For Example : the SecurityConfig class exists in the
au.acegi.springsecurity.attribute packge therefore the ant task call is :
<taskdef name='attribute-compiler'
classname="org.apache.commons.attributes.compiler.AttributeCompiler"
classpathref="attribute-compiler-classpath"/>
<attribute-compiler destdir="generated"
attributePackages="au.acegi.springsecurity.attribute">
<fileset dir="java"/>
</attribute-compiler>
An extract of the generated code for that getBalance method is :
import au.acegi.springsecurity.attribute.*;
public class BankService$__attributeRepository implements
org.apache.commons.attributes.AttributeRepositoryClass {
---stripped for brevity---
private void initClassAttributes () {
{
SecurityAttribute _attr = new SecurityAttribute("ROLE_TELLER" //
D:/workspace3/acegi-attributes/sample/java/BankService.java:10
);
Object _oattr = _attr; // Need to erase type information
if (_oattr instanceof org.apache.commons.attributes.Sealable)
{((org.apache.commons.attributes.Sealable) _oattr).seal ();}
classAttributes.add ( _attr );
}
---stripped for brevity---
}
so you can see that it basically treats the @@ declaration as a java
constructor call, with one exception.. it converts named values in to bean
property setters.
i.e
@@RoleConstraint(role="ROLE_TELLER")
This will generate code like :
RoleConstraint _attr = new RoleConstraint();
_attr.setRole("ROLE_TELLER")
Also notice that your attribute classes can implement Sealable which means
that their seal() method gets called when they get initialised, allowing you
to do some initialisation.
Therefore to answer your question ;) you can use any java class, as long as
you either fully qualify it, or include the package in the compiler task.
I suggest that you avoid using the same attribute class for all rules, and
instead use a type hierarchy :
For example instead of using
@@ValidationRule("range", "minimum=0.0, maximum=100,000.0")
Have a RangeValidationRule class and do this :
@@RangeValidationRule(minimum=0.0, maximum=100000.0)
I think this is better than
@@ValidationRule("range", new NumberRange(0.0, 100,000.0))
Cameron.
_____
From: spr...@li...
[mailto:spr...@li...] On Behalf Of
Keith Donald
Sent: Thursday, 11 March 2004 6:00 AM
To: spr...@li...
Subject: [Springframework-developer] commons attributes questions
I was browsing Ben and Cameron's new security stuff (looks great) and I like
how they did the attribute markup for the security roles required for
certain methods:
/**
* @@SecurityConfig("ROLE_TELLER")
* @@SecurityConfig("ROLE_SUPERVISOR")
* @@SecurityConfig("BANKSECURITY_CUSTOMER")
* @@SecurityConfig("RUN_AS_SERVER")
*/
public float getBalance(int id);
Specifically, I like how they didn't use a qualified class name, which makes
the attribute more compact & easier to type out. Also I liked how they went
with a generic "SecurityConfig" attribute. I was thinking of applying
something similiar to the validator attributes markup. So instead of
instantating the rule classes directly, you just instantiate a
ValidationRule attribute metadata class, with a String identifier for the
rule, and then a string list for any rule-specific properties. Something
like this:
/**
* @@ValidationRule("required")
* @@ValidationRule("range", "minimum=0.0, maximum=100,000.0")
*/
public float getBalance(int id);
The question I have regarding this is with commons-attributes:
1. Does it let you instantiate arbitrary objects using their constructors
within an attribute declaration? For example, can I say something like:
* @@ValidationRule("range", new NumberRange(0.0, 100,000.0))?
Somehow I doubt it, but I was curious how extensive its support was for
instantating objects declared as attributes (I mean obviously it can handle
Strings, but does it do type conversion too?)
What I am thinking abut doing is just having something like this:
* @@ValidationRule("range", "minimum=0.0, maximum=100,000.0")
.. where the first parameter is a String identifier for the rule, whose
backing PropertyValidationRule instance is looked up using a rule factory
configured by Spring, and the second parameter is a string-separated list of
bean property->value pairs where I'll likely just use BeanWrapper or OGNL
later on...
Keith
|
|
From: Anna C. <ac...@er...> - 2004-03-10 21:22:44
|
Keith I don't think that the Spring IoC configuration is a valid one according to http://www.springframework.org/dtd/spring-beans.dtd Anna -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Keith Donald Sent: Wednesday, March 10, 2004 8:10 AM To: spr...@li... Subject: Re: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox Correct me if I'm wrong, but I don't think there is. However, I know if you're using Eclipse, the sandbox code (including tests) automatically gets incrementally compiled in target/other-classes, which is automatically put in the classpath. So I have been basically running everything in the sandbox from Eclipse directly. Keith ----- Original Message ----- From: <sam...@ma...> To: <spr...@li...> Sent: Wednesday, March 10, 2004 6:42 AM Subject: RE: [Springframework-developer] declarative rules-based bean validator w/ attributes in sandbox > Excellent, thanks Keith. On the subject of the sandbox, is there a build > directive to buils the sandbox code, or should I just overwrite the src with the > sandbox code and rebuild? > > sam > > Quoting Keith Donald <kd...@cs...>: > > > I checked in a "BeanValidatorBuilder" class in the sandbox under > > validation.support that allows you to declaratively assign > > PropertyValidationRules to bean properties via Spring-IoC, through a > > scripting environment such as Groovy/Beanshell, or programatically in = > > plain > > java. This is in addition to support for defining validation rules on = > > beans > > via source markup. > > > > Here's an example on how to use it: > > > > Spring IoC configuration > > > > <bean id=3D"validatorBuilder" > > class=3D"org.springframework.validation.support.ValidatorBuilder"/> > > <constructor-arg index=3D"0"> > > <description>The validated bean type (class or > > interface) aka 'root entity'</description> > > <value>org.springframework.validation.Pet</value> > > </constructor-arg> > > <map> > > <description> > > A map of property name keys to one or more > > governing property validation rules. > > Nested bean property names from the 'root > > entity' are supported. > > Rule instances may be reused across > > properties if desired. > > </description> > > <entry key=3D"name.lastName"> > > <value><bean > > class=3D"org.springframework.validation.rules.Required"/></value> > > </entry> > > <entry key=3D"favoriteToy"> > > <value> > > <set> > > <bean > > class=3D"org.springframework.validation.rules.Required"/> > > <bean > > class=3D"org.springframework.validation.rules.MaxLength"> > > =09 > > <constructor-arg>25</constructor-arg> > > > > </bean> > > </set> > > </value> > > </entry> > > </map> > > </bean> > > > > Java > > > > BeanValidatorBuilder builder =3D new = > > BeanValidatorBuilder(Pet.class); > > > > builder.setPropertyValidator("name.lastName", new Required()); > > > > Set toyRules =3D new HashSet(); > > toyRules.add(new Required()); > > toyRules.add(new MaxLength(255)); > > builder.setPropertyValidator("favoriteToy", toyRules); > > > > Keith > > sam > http://www.magpiebrain.com/ > > > > ------------------------------------------------------- > 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 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- 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 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Keith D. <kd...@cs...> - 2004-03-10 20:18:02
|
I was browsing Ben and Cameron's new security stuff (looks great) and I =
like
how they did the attribute markup for the security roles required for
certain methods:
=20
/**
* @@SecurityConfig("ROLE_TELLER")
* @@SecurityConfig("ROLE_SUPERVISOR")
* @@SecurityConfig("BANKSECURITY_CUSTOMER")
* @@SecurityConfig("RUN_AS_SERVER")
*/
public float getBalance(int id);
Specifically, I like how they didn't use a qualified class name, which =
makes
the attribute more compact & easier to type out. Also I liked how they =
went
with a generic "SecurityConfig" attribute. I was thinking of applying
something similiar to the validator attributes markup. So instead of
instantating the rule classes directly, you just instantiate a
ValidationRule attribute metadata class, with a String identifier for =
the
rule, and then a string list for any rule-specific properties. =
Something
like this:
=20
/**
* @@ValidationRule("required")
* @@ValidationRule("range", "minimum=3D0.0, maximum=3D100,000.0")
*/
public float getBalance(int id);
The question I have regarding this is with commons-attributes:
=20
1. Does it let you instantiate arbitrary objects using their =
constructors
within an attribute declaration? For example, can I say something like:
* @@ValidationRule("range", new NumberRange(0.0, 100,000.0))?
Somehow I doubt it, but I was curious how extensive its support was for
instantating objects declared as attributes (I mean obviously it can =
handle
Strings, but does it do type conversion too?)
=20
What I am thinking abut doing is just having something like this:
* @@ValidationRule("range", "minimum=3D0.0, maximum=3D100,000.0")
.. where the first parameter is a String identifier for the rule, whose
backing PropertyValidationRule instance is looked up using a rule =
factory
configured by Spring, and the second parameter is a string-separated =
list of
bean property->value pairs where I'll likely just use BeanWrapper or =
OGNL
later on...
=20
Keith
|
|
From: Darren D. <da...@da...> - 2004-03-10 20:01:46
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I notice the FreeMarker integration status in JIRA has been changed from=20 Minor to Major.. given that the FM boys are releasing RC1 tonight=20 (apparantly) I'm happy to move this from the sandbox to the main tree as=20 soon as I can get a copy of it. Anyone have any objections? As far as I'm= =20 concerned, what's written works well but there may be a need for some=20 updates such as making Template beans available. Over the next couple of days I'll make a couple of small planned=20 enhancements to it, fix the javadoc and add it to the reference=20 documentation. Do we have a firm date in mind yet for 1.0-final? Are we aiming for the=20 20th (1st day of Spring as - I think - Thomas pointed out) ? Regards, =2D --=20 Darren Davison Public Key: http://www.davison.uk.net/key.jsp =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAT3AAKLMLAN01aw0RAvgRAJ4y6MflX6UjkO2qmnMTaIz2Bo/ocACfb7XD czy7iDY37cIge2ISqqeYLqQ=3D =3DksZ8 =2D----END PGP SIGNATURE----- |
|
From: Keith D. <kd...@cs...> - 2004-03-10 14:28:05
|
Correct me if I'm wrong, but I don't think there is. However, I know if
you're using Eclipse, the sandbox code (including tests) automatically gets
incrementally compiled in target/other-classes, which is automatically put
in the classpath. So I have been basically running everything in the
sandbox from Eclipse directly.
Keith
----- Original Message -----
From: <sam...@ma...>
To: <spr...@li...>
Sent: Wednesday, March 10, 2004 6:42 AM
Subject: RE: [Springframework-developer] declarative rules-based bean
validator w/ attributes in sandbox
> Excellent, thanks Keith. On the subject of the sandbox, is there a build
> directive to buils the sandbox code, or should I just overwrite the src
with the
> sandbox code and rebuild?
>
> sam
>
> Quoting Keith Donald <kd...@cs...>:
>
> > I checked in a "BeanValidatorBuilder" class in the sandbox under
> > validation.support that allows you to declaratively assign
> > PropertyValidationRules to bean properties via Spring-IoC, through a
> > scripting environment such as Groovy/Beanshell, or programatically in =
> > plain
> > java. This is in addition to support for defining validation rules on =
> > beans
> > via source markup.
> >
> > Here's an example on how to use it:
> >
> > Spring IoC configuration
> >
> > <bean id=3D"validatorBuilder"
> > class=3D"org.springframework.validation.support.ValidatorBuilder"/>
> > <constructor-arg index=3D"0">
> > <description>The validated bean type (class or
> > interface) aka 'root entity'</description>
> > <value>org.springframework.validation.Pet</value>
> > </constructor-arg>
> > <map>
> > <description>
> > A map of property name keys to one or more
> > governing property validation rules.
> > Nested bean property names from the 'root
> > entity' are supported.
> > Rule instances may be reused across
> > properties if desired.
> > </description>
> > <entry key=3D"name.lastName">
> > <value><bean
> > class=3D"org.springframework.validation.rules.Required"/></value>
> > </entry>
> > <entry key=3D"favoriteToy">
> > <value>
> > <set>
> > <bean
> > class=3D"org.springframework.validation.rules.Required"/>
> > <bean
> > class=3D"org.springframework.validation.rules.MaxLength">
> > =09
> > <constructor-arg>25</constructor-arg>
> >
> > </bean>
> > </set>
> > </value>
> > </entry>
> > </map>
> > </bean>
> >
> > Java
> >
> > BeanValidatorBuilder builder =3D new =
> > BeanValidatorBuilder(Pet.class);
> >
> > builder.setPropertyValidator("name.lastName", new Required());
> >
> > Set toyRules =3D new HashSet();
> > toyRules.add(new Required());
> > toyRules.add(new MaxLength(255));
> > builder.setPropertyValidator("favoriteToy", toyRules);
> >
> > Keith
>
> sam
> http://www.magpiebrain.com/
>
>
>
> -------------------------------------------------------
> 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
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: <sam...@ma...> - 2004-03-10 11:59:42
|
Excellent, thanks Keith. On the subject of the sandbox, is there a build
directive to buils the sandbox code, or should I just overwrite the src with the
sandbox code and rebuild?
sam
Quoting Keith Donald <kd...@cs...>:
> I checked in a "BeanValidatorBuilder" class in the sandbox under
> validation.support that allows you to declaratively assign
> PropertyValidationRules to bean properties via Spring-IoC, through a
> scripting environment such as Groovy/Beanshell, or programatically in =
> plain
> java. This is in addition to support for defining validation rules on =
> beans
> via source markup.
>
> Here's an example on how to use it:
>
> Spring IoC configuration
>
> <bean id=3D"validatorBuilder"
> class=3D"org.springframework.validation.support.ValidatorBuilder"/>
> <constructor-arg index=3D"0">
> <description>The validated bean type (class or
> interface) aka 'root entity'</description>
> <value>org.springframework.validation.Pet</value>
> </constructor-arg>
> <map>
> <description>
> A map of property name keys to one or more
> governing property validation rules.
> Nested bean property names from the 'root
> entity' are supported.
> Rule instances may be reused across
> properties if desired.
> </description>
> <entry key=3D"name.lastName">
> <value><bean
> class=3D"org.springframework.validation.rules.Required"/></value>
> </entry>
> <entry key=3D"favoriteToy">
> <value>
> <set>
> <bean
> class=3D"org.springframework.validation.rules.Required"/>
> <bean
> class=3D"org.springframework.validation.rules.MaxLength">
> =09
> <constructor-arg>25</constructor-arg>
>
> </bean>
> </set>
> </value>
> </entry>
> </map>
> </bean>
>
> Java
>
> BeanValidatorBuilder builder =3D new =
> BeanValidatorBuilder(Pet.class);
>
> builder.setPropertyValidator("name.lastName", new Required());
>
> Set toyRules =3D new HashSet();
> toyRules.add(new Required());
> toyRules.add(new MaxLength(255));
> builder.setPropertyValidator("favoriteToy", toyRules);
>
> Keith
sam
http://www.magpiebrain.com/
|
|
From: <jue...@we...> - 2004-03-10 11:42:31
|
Quoting a discussion around a issue in our JIRA: Andreas tries to = subclass JtaTransactionManager to involve TopLink UnitOfWorks and faces = some problems. I suggest that standard JtaTransactionManager should be = fine here, delegating TopLink UnitOfWork handling to transaction = synchronization (a la Hibernate SessionFactoryUtils). Read the JIRA postings below for details. I'd like to move the = discussion to the developer mailing list; after all, such a discussion = is not what JIRA was made for ;-) Juergen Threading issue with JtaTransactionFactory Created: 10/Mar/04 01:52 AM Updated: 10/Mar/04 05:21 AM =20 Project: Spring Framework=20 Component/s: SpringTX =20 Affects Version/s: 1.0 final =20 Fix Version/s: 1.0 final =20 =20 Environment: W2k, Sun SDK 1.4.2, Bea WebLogic 8.1SP1 =20 =20 Description =20 I encountered a potential threading problem concerning the = JtaTransactionFactory.=20 Currently I have a subclass of JtaTransactionFactory for purposes of = integrating TopLink on a JTS level. So far everything works fine. = However, I overrode lookupUserTransaction to provide an own = Implementation to provide access to a TopLink UnitOfWork.=20 Within WebLogic I then found that multiple UserTransaction instances = have been created, causing problems.=20 I fixed the issue by overriding the following Methods, providing = synchronized versions in my subclass:=20 - doGetTransaction=20 - lookupUserTransaction=20 - setUserTransaction (not necessary for my case, but for completion's = sake)=20 I guess, the multiple creation is due to the fact, that multiple = instances are using the singleteton Tx-Manager and the lookup is been = performed by multiple threads on SessionBean-initilization.=20 Since this seems to me a general issue, I propose to provide necessary = synchronizations within the base type, if possible. Probably there are = similar issues with the "TransactionManager" property as well.=20 I know about the J2EE Spec discouraging the use of synchronization, but = here it seems to be unavoidable.=20 Regards,=20 Andreas=20 P.S.: Besides that, a copy&paste issue=20 The error message in JtaTransactionManager#lookupTransactionManager is = wrong, referring to the UserTransaction instead of the = TransactionManager=20 =20 =20 Comments Change History =20 Juergen Hoeller [ 10/Mar/04 02:16 AM ] Delete [ Permlink ] =20 JtaTransactionnManager looks up the UserTransaction and the = TransactionManager in its afterPropertiesSet method, invoked once on = initialization of the transaction manager bean. I don't see how multiple = UserTransaction instances can be created here: The located = UserTransaction is kept in an instance field of JtaTransactionManager, = fetched from there by doGetTransaction.=20 What kind of UserTransaction are you returning from your overridden = lookupUserTransaction method? Note that a JTA UserTransaction is a = shared object that works with ThreadLocals underneath, while a TopLink = UnitOfWork is just for use by a single thread. The UnitOfWork is closer = to a JDBC Connection or Hibernate Transaction than to a JTA = UserTransaction. So I guess the problem is your subclass of = JtaTransactionManager.=20 I haven't thought about Spring/JTA/TopLink integration in detail, but it = should be possible to achieve this similar to Spring's Hibernate = integration: You use the standard JtaTransactionManager there, with = SessionFactoryUtils auto-detecting an active transaction, binding a = Session to the TransactionSynchronizationManager, and registering a = transaction synchronization that closes the Session after transaction = completion.=20 Let's move this discussion to the developer list. Of course, please tell = me if I misunderstood something! From my point of view, the standard = JtaTransactionManager's thread-safety is fine as it is, for typical = usage with a JTA UserTransaction. Therefore, I'll close this issue if we = agree that it doesn't affect usage with standard JTA.=20 Juergen =20 =20 Andreas Senft [ 10/Mar/04 04:18 AM ] Delete [ Permlink ] =20 Hello J=FCrgen,=20 thanks for the quick response.=20 Yes I'm aware of the UserTransaction characteristics. Actually I just = return a wrapper around the "standard" UserTransaction providing = additionally the active TopLink UnitOfWork.=20 I haven't had a look at the Hibernate implementation yet. TopLink is = already configured to integrate itself with BEAs JTS, so the inheritance = from JtaTransactionManager seemed fitting.=20 Concerning the initialization issue, I think I have a clue:=20 I have several Session Beans. Also BEA is configured to populate the = pool on deployment, so multiple Instances will be created on server = startup (possibly by multiple Worker threads).=20 Each Session Bean has a POJO Handler with attached DAO and each DAO has = a reference to the single TransactionManager.=20 As it seems to me, in that case the lookup for the UserTransaction is = invoked more than once. Probably there might be a threading issue in the = configuration itself?=20 If it has no impact on "normal" JTA transactions I agree to close this = issue, since I have a workaround. If I find out more about the issue, I = will let you know.=20 Regards,=20 Andreas =20 =20 Andreas Senft [ 10/Mar/04 04:40 AM ] Delete [ Permlink ] =20 One afterthought:=20 If DefaultListableBeanFactory#preInstantiateSingletons is not invoked, I = guess the Initialization is performed lazily and thus subject of = concurrency issues?=20 Might that be an explanation?=20 Regards,=20 Andreas =20 =20 Juergen Hoeller [ 10/Mar/04 05:21 AM ] Delete [ Permlink ] =20 Actually, if you don't pre-instantiate singletons, there is indeed a = potential for race conditions - we don't recommend that for = multi-threaded environments. However, I've recently committed fixes to = the BeanFactory implementations that allow for proper lazy-init of = singletons in a multi-threaded environment.=20 So if that might be the reason for the behavior that you experience, = please pre-instantiate your singletons or use the current CVS HEAD. We = should not have to synchronize in JtaTransactionManager in any sort of = usage that I can image. It would be good to find the root cause and to = consequently avoid your current workaround.=20 How do you use your TopLink UnitOfWorks behind a UserTransaction = interface? Do you store them in ThreadLocals?=20 I really recommend checking out SessionFactoryUtils and its use of = transaction synchronization: You should be able to use the standard = JtaTransactionManager then, lazily starting and binding a TopLink = UnitOfWork at first access, committing the UnitOfWork in the = beforeCommit callback of Spring's transaction synchronization.=20 It would probably be better to move this discussion to the developer = mailing list. It's more about how to integrate TopLink than about issues = that affect standard JtaTransactionManager usage. Let's quote our = discussion there to give others a start.=20 Juergen =20 DI J=FCrgen H=F6ller Senior System Architect ______________________________________ werk3ATS - division systementwicklung werk3AT informations- und mediensysteme europaplatz 4 A - 4020 linz t. +43 (0) 732 71 65 29 502 f. +43 (0) 732 71 65 29 3 mailto:jue...@we... http://www.werk3at.com ______________________________________ werk3ATS - WIR ENTWICKELN ERFOLG |
|
From: Keith D. <kd...@cs...> - 2004-03-10 01:10:28
|
I checked in a "BeanValidatorBuilder" class in the sandbox under
validation.support that allows you to declaratively assign
PropertyValidationRules to bean properties via Spring-IoC, through a
scripting environment such as Groovy/Beanshell, or programatically in =
plain
java. This is in addition to support for defining validation rules on =
beans
via source markup.
Here's an example on how to use it:
Spring IoC configuration
<bean id=3D"validatorBuilder"
class=3D"org.springframework.validation.support.ValidatorBuilder"/>
<constructor-arg index=3D"0">
<description>The validated bean type (class or
interface) aka 'root entity'</description>
<value>org.springframework.validation.Pet</value>
</constructor-arg>
<map>
<description>
A map of property name keys to one or more
governing property validation rules.
Nested bean property names from the 'root
entity' are supported.
Rule instances may be reused across
properties if desired.
</description>
<entry key=3D"name.lastName">
<value><bean
class=3D"org.springframework.validation.rules.Required"/></value>
</entry>
<entry key=3D"favoriteToy">
<value>
<set>
<bean
class=3D"org.springframework.validation.rules.Required"/>
<bean
class=3D"org.springframework.validation.rules.MaxLength">
=09
<constructor-arg>25</constructor-arg>
</bean>
</set>
</value>
</entry>
</map>
</bean>
Java
BeanValidatorBuilder builder =3D new =
BeanValidatorBuilder(Pet.class);
builder.setPropertyValidator("name.lastName", new Required());
Set toyRules =3D new HashSet();
toyRules.add(new Required());
toyRules.add(new MaxLength(255));
builder.setPropertyValidator("favoriteToy", toyRules);
Keith
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf =
Of
Keith Donald
Sent: Monday, March 08, 2004 6:08 PM
To: spr...@li...
Subject: Re: [Springframework-developer] declarative rules-based bean
validator w/ attributes in sandbox
Sam,
Up until some design changes this weekend, I had a working source
implementation that would let you build validation configuration =
information
programatically (either java or a scripting shell like groovy/beanshell) =
or
by using a Spring context (xml.) I haven't checked it back in yet, but =
I
will do so ASAP. Thanks for pointing that out, Keith
----- Original Message -----=20
From: "Sam Newman" <sam...@ma...>
To: <spr...@li...>
Sent: Monday, March 08, 2004 5:31 PM
Subject: Re: [Springframework-developer] declarative rules-based bean
validator w/ attributes in sandbox
> Keith,
>
> At present can validation rules only be configured from in code=20
> attributes? Many people will not be happy using this quite new (and=20
> relatively non-standard) technique. I appreciate this might become=20
> more widespread with the metadata support in 1.5 but it will be a=20
> while before this is universally being used. As it stands, many people =
> dislike the need for tools like XDoclet. Is there currently support=20
> for reading validation rules from a config file?
>
> Keith Donald wrote:
>
> > I just committed the rules-based bean validator Seth and I have been =
> > working on to the spring/sandbox under the=20
> > 'org.springframework.validation' package. The design has now gone=20
> > through several internal iterations and is waiting for your review=20
> > and feedback.
> >
> > Within 'validation', you'll find the following interfaces:
> >
> > BeanValidationService
> > (the main client interface, extends
> > org.springframework.validation.Validator)
> >
> > BeanValidatorSource
> > (encapsulates logic for loading validator configuration
> > information from a specific source.)
> >
> > PropertyValidator
> > (encapsulates the validation of all PropertyValidationRules =
that
> > apply to a particular property.)
> >
> > PropertyValidationRule
> > (encapsulates a single validation rule and typing-hint/error
> > message building logic.)
> >
> > ValidationResultsCollector
> > (data-collector with callbacks to track validation progress. =
Is
> > also used to populate an Errors object.)
> >
> > Within 'validation.rules', you'll find the out-of-the-box rules=20
> > built to-date. Obviously we want to build up a rich library of=20
> > commonly-used rules.
> >
> > Within 'validation.support', you'll find implementations for the=20
> > above interfaces, as well as the "AttributesValidatorSource"=20
> > implementation which is responsible for loading validators=20
> > declaratively defined in source-metadata using commons-attributes.
> >
> > To use with a commons-attributes source, declare the following in a=20
> > spring-context definition:
> >
> > <bean id=3D"beanValidationService"
> >
class=3D"org.springframework.validation.support.DefaultBeanValidationServ=
ice"/
>
> > <constructor-arg index=3D"0">
> > <description>The source providing validator=20
> > configuration information.</description>
> > <bean id=3D"attributesSource"
> >
class=3D"org.springframework.validation.support.AttributesValidatorSource=
"/>
> > </constructor-arg>
> > </bean>
> >
> > Again, beanValidationService is just a regular Spring validator, so=20
> > you can treat it as such.
> >
> > Internally, the design leverages the java-beans BeanInfo paradigm to =
> > store validators loaded from a particular source. If a bean is=20
> > validateable, it's associated BeanInfo.BeanDescriptor will have a=20
> > property called "isValidated" set to true. In addition, each=20
> > PropertyDescriptor will also have a "isValidated" property, and if=20
> > true will have a PropertyValidator reference stored under the=20
> > "validator" property. I thought this was a good way to leverage the =
> > existing javabeans metadata API (and the good thing is it removes us =
> > from having to cache anything ourselves or maintain some parallel=20
> > hierarchy of bean
> > validators...) The generic validation algorithm simply iterates =
over
> > each BeanInfo and PropertyDescriptor looking for attached =
validators...
> > (which could've been populated by any source.)
> >
> > As a result of these commits, some common (small) utility classes=20
> > were also commited to sandbox/util. All of these relocated straight =
> > from spring-rcp.util. Tests are also in sandbox/test, but I admit=20
> > right now the Validation stuff is in need of better tests.
> >
> > This framework should work equally well in web and rich-client=20
> > environments. I think once we get a iteration or two more we'll be
there!
> >
> > Keith
>
>
> --
> sam
> http://www.magpiebrain.com/
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of=20
> GenToo technologies. Learn everything from fundamentals to system=20
> =
administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
> _______________________________________________
> Springframework-developer mailing list=20
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
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=3D1470&alloc_id=3D3638&op=3Dcli=
ck
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: James C. <jim...@do...> - 2004-03-09 18:21:50
|
Is webapp.root necessary to get log messages from Spring classes (logger.debug) to show up? I can't seem to get this to occur using = log4j. > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On = Behalf > Of j=FCrgen h=F6ller [werk3AT] > Sent: Tuesday, March 09, 2004 2:19 AM > To: spr...@li... > Subject: Re: [Springframework-developer] RE: Log4J configuration >=20 > There have been some issues with the reloading of WARs when using the > "webapp.root" system property for context-relative log file paths. > However, those should all have been sorted out. I haven't come across = the > behavior that you encountered yet, though. >=20 > Juergen >=20 |
|
From: Darren D. <da...@da...> - 2004-03-09 15:49:11
|
> Yeah.. The shared varible system works. Wrapping a map in a simple has=
h
> is
> the same technique that I have used elsewhere.
good :)
> This will make writing an email template system quite easy :
>
> <bean id=3D"feedbackTransformer"
> class=3D"spring.ui.freemarker.TransformerFactoryBean" singleton=3D"fals=
e">
> <property
> name=3D"templateLocation"><value>classpath:com/acme/feedback.ftl</value=
></prop>
erty>
> <!-- all properties of the context are entered into a simple hash -->
> <property name=3D"context">
> <map>etc...</map>
> </property>
> </bean>
>
> Then in your code you can do
>
> TransformerFactoryBean transformer
> (TransformerFactoryBean)context.getBean("feedbackTransformer");
>
> transformer.addParam("name", model.getName());
>
> emailSender.send("fee...@ac...", "feedback",
> transformer.transform());
The problem is that you can't set shared variables on a template unless
you retrieve its configuration to do so - which seems to me to have
reduced value in that you either still require the
ConfigurationFactoryBean in order to share it amongst the template beans
you define, or you end up with separate instances of Configuration object=
s
per template.
Note that you can achieve what you want (I think) from the existing
ConfigurationFactoryBean. Set the freemarkerSettings and
freemarkerVariables as required and then just get the template from the
config via a MethodInvokingFactoryBean. Any other 'context properties'
(are you talking about beans in the application context?) can be set by
Spring on your domain object in the normal manner.
(all this is off the top of my head - not tried any of it)
<bean id=3D"fmConfiguration"
class=3D"spring.ui.freemarker.ConfigurationFactoryBean">
<property name=3D"freemarkerVariables">
<map>etc...</map>
</property>
</bean>
<bean id=3D"fmTemplate"
class=3D"[spring].beans.factory.config.MethodInvokingFactoryBean">
<property name=3D"targetObject"><ref local=3D"fmConfiguration"/></prope=
rty>
<property name=3D"targetMethod"><value>getTemplate</value></property>
<property name=3D"args">
<list>
<value>path/to/my/template.ftl</value>
</list>
</property>
</bean>
<bean id=3D"myObject"
class=3D"com.myco.MyDomainClass">
<property name=3D"template"><ref local=3D"fmTemplate"/></property>
</bean>
- and -
public class MyDomainClass {
private Template template;
/**
* have Spring set the template as a bean property
*/
public void setTemplate(Template template) {
this.template =3D template;
}
public void myLogic() {
/* create modelMap */
...
template.process(modelMap, someWriter);
}
}
I can see value in reducing the configuration by defining a
TemplateFactory though, so let me know what you think?
Regards,
--=20
Darren Davison
Public Key: http://www.davison.uk.net/key.jsp
|
|
From: Cameron B. <ca...@da...> - 2004-03-09 15:04:26
|
I am going ahead and writing a Transformer anyway ;)
I'll post the code for you to look at when it is done.
One thing that your Configuration bean needs is :
At the end of ConfigurationFactory.initConfiguration()=20
this.configuration.setTemplateLoader(new ClassTemplateLoader());
Or.. You could allow spring configuration of template loadersm ;)
Cam
> -----Original Message-----
> From: spr...@li...=20
> [mailto:spr...@li...]
> On Behalf Of Cameron Braid
> Sent: Tuesday, 9 March 2004 11:41 PM
> To: spr...@li...
> Subject: RE: [Springframework-developer] FreeMarker
>=20
> Yeah.. The shared varible system works. Wrapping a map in a=20
> simple hash is the same technique that I have used elsewhere.=20
>=20
> For the time being I will only be using the=20
> ConfigurationFactoryBean, since I don't use Spring MVC.
>=20
> Are there plans to implement templates loading via the normal=20
> spring Resource system
>=20
> As well as something like a TransformerFactoryBean. I see=20
> something that provides bean property configuration of the=20
> initial context, the template location, and allows custom=20
> objects to be added to the context once the bean has been=20
> obtained from the context.
>=20
> This will make writing an email template system quite easy :
>=20
> <bean id=3D"feedbackTransformer"
> class=3D"spring.ui.freemarker.TransformerFactoryBean" =
singleton=3D"false">
> <property
> name=3D"templateLocation"><value>classpath:com/acme/feedback.ftl
> </value></prop
> erty>
> <!-- all properties of the context are entered into a=20
> simple hash -->
> <property name=3D"context">
> <map>etc...</map>=09
> </property>
> </bean>
>=20
> Then in your code you can do=20
>=20
> TransformerFactoryBean transformer =3D
> (TransformerFactoryBean)context.getBean("feedbackTransformer");
>=20
> transformer.addParam("name", model.getName());
>=20
> emailSender.send("fee...@ac...", "feedback",=20
> transformer.transform());
>=20
> I can certainly write this implementation if it could be=20
> included in spring, since I use something like it in my projects.
>=20
> The only issue is that I don't understand the spring resource system.
>=20
> I'll read about it you someone want me to implement this bean.
>=20
> Thanks,
>=20
> Cameron.
>=20
> > -----Original Message-----
> > From: spr...@li...
> > [mailto:spr...@li...]
> > On Behalf Of Darren Davison
> > Sent: Tuesday, 9 March 2004 11:03 PM
> > To: spr...@li...
> > Subject: RE: [Springframework-developer] FreeMarker
> >=20
> >=20
> > > Its me who is the doofus.. I didn't dig around enough to see the=20
> > > superclass !
> > >
> > > Sorry about that.
> >=20
> > no worries. Let us know how the current code meets your existing=20
> > needs; particularly whether your shared variables get exposed=20
> > correctly to the FreeMarker template. We can then decide=20
> whether to=20
> > add the stuff to the main source tree for 1.0-final (the FM=20
> guys are=20
> > planning to release
> > 2.3-RC1 any day now) or leave it in the sandbox until 1.1
> >=20
> > Cheers!
> >=20
> > --
> > Darren Davison
> > Public Key: http://www.davison.uk.net/key.jsp
> >=20
> >=20
> >=20
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20
> > tutorial presented by Daniel Robbins, President and CEO of GenToo=20
> > technologies. Learn everything from fundamentals to system=20
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick
> > _______________________________________________
> > Springframework-developer mailing list=20
> > Spr...@li...
> >=20
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
> >=20
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials Free=20
> Linux tutorial presented by Daniel Robbins, President and CEO=20
> of GenToo technologies. Learn everything from fundamentals to=20
> system =
administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>=20
>=20
|
|
From: Cameron B. <ca...@da...> - 2004-03-09 13:58:33
|
Yeah.. The shared varible system works. Wrapping a map in a simple hash =
is
the same technique that I have used elsewhere.=20
For the time being I will only be using the ConfigurationFactoryBean, =
since
I don't use Spring MVC.
Are there plans to implement templates loading via the normal spring
Resource system
As well as something like a TransformerFactoryBean. I see something =
that
provides bean property configuration of the initial context, the =
template
location, and allows custom objects to be added to the context once the =
bean
has been obtained from the context.
This will make writing an email template system quite easy :
<bean id=3D"feedbackTransformer"
class=3D"spring.ui.freemarker.TransformerFactoryBean" =
singleton=3D"false">
<property
name=3D"templateLocation"><value>classpath:com/acme/feedback.ftl</value><=
/prop
erty>
<!-- all properties of the context are entered into a simple hash -->
<property name=3D"context">
<map>etc...</map>=09
</property>
</bean>
Then in your code you can do=20
TransformerFactoryBean transformer =3D
(TransformerFactoryBean)context.getBean("feedbackTransformer");
transformer.addParam("name", model.getName());
emailSender.send("fee...@ac...", "feedback", =
transformer.transform());
I can certainly write this implementation if it could be included in =
spring,
since I use something like it in my projects.
The only issue is that I don't understand the spring resource system.
I'll read about it you someone want me to implement this bean.
Thanks,
Cameron.
> -----Original Message-----
> From: spr...@li...=20
> [mailto:spr...@li...]
> On Behalf Of Darren Davison
> Sent: Tuesday, 9 March 2004 11:03 PM
> To: spr...@li...
> Subject: RE: [Springframework-developer] FreeMarker
>=20
>=20
> > Its me who is the doofus.. I didn't dig around enough to see the=20
> > superclass !
> >
> > Sorry about that.
>=20
> no worries. Let us know how the current code meets your=20
> existing needs; particularly whether your shared variables=20
> get exposed correctly to the FreeMarker template. We can=20
> then decide whether to add the stuff to the main source tree=20
> for 1.0-final (the FM guys are planning to release
> 2.3-RC1 any day now) or leave it in the sandbox until 1.1
>=20
> Cheers!
>=20
> --
> Darren Davison
> Public Key: http://www.davison.uk.net/key.jsp
>=20
>=20
>=20
> -------------------------------------------------------
> 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_id638&op=3Dick
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>=20
|
|
From: Thomas R. <tri...@tr...> - 2004-03-09 13:54:47
|
Liuxin,
The source is in the download under samples\petclinic\src
Thomas
liuxin wrote:
>hi *:
> where can i get the petclinic source code ?
>thank you
>
>
> yours,
>
> liuxin
> li...@ic...
> 2004-03-09
>NS^甸X'骡S黑+l.)钇郗⒏遍烛
>┾zThm抚苞薏'^!●:(电!h'-娅薤+awZ[-⑻vhj亘m,vw(秀(Ω(^介hリ)b b苍┊)鼎{
>+Z)z槽,㈥+薅mο+-彩.+-躇b藏Ω(^介hper=
>
|
|
From: Alef A. <al...@jt...> - 2004-03-09 13:41:35
|
SXQncyBpbmNsdWRlZCBpbiB0aGUgZGlzdHJpYnV0aW9uLCB3aGljaCBjYW4gYmUgZm91bmQgYXQg c291cmNlZm9yZ2UgKGh0dHA6Ly9zb3VyY2Vmb3JnZS5uZXQvcHJvamVjdC9zaG93ZmlsZXMucGhw P2dyb3VwX2lkPTczMzU3KSBhcyB3ZWxsIGFzIGluIHRoZSBDVlMsIGJ1dCB0aGVyZSBoYXZlbid0 IGJlZW4gYW55IGNoYW5nZXMgcmVjZW50bHkgYXMgZmFyIGFzIEkga25vdyBzbyB0aGUgZGlzdHJp YnV0aW9uIHNob3VsZCBzdWl0ZSB5b3UganVzdCBmaW5lLg0KDQpBbGVmDQoNCg0KPiAtLS0tLU9y aWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBzcHJpbmdmcmFtZXdvcmstZGV2ZWxvcGVyLWFk bWluQGxpc3RzLnNvdXJjZWZvcmdlLm5ldA0KPiBbbWFpbHRvOnNwcmluZ2ZyYW1ld29yay1kZXZl bG9wZXItYWRtaW5AbGlzdHMuc291cmNlZm9yZ2UubmV0XSBPbiBCZWhhbGYNCj4gT2YgbGl1eGlu DQo+IFNlbnQ6IFR1ZXNkYXksIE1hcmNoIDA5LCAyMDA0IDI6MTIgUE0NCj4gVG86IFNwcmluZ2Zy YW1ld29yay1kZXZlbG9wZXINCj4gU3ViamVjdDogW1NwcmluZ2ZyYW1ld29yay1kZXZlbG9wZXJd IHBldGNsaW5pYyBzb3VyY2UgY29kZQ0KPiANCj4gaGkgKjoNCj4gIHdoZXJlIGNhbiBpIGdldCB0 aGUgcGV0Y2xpbmljIHNvdXJjZSBjb2RlID8NCj4gdGhhbmsgeW91DQo+IA0KPiANCj4g44CA44CA 44CA44CA44CA44CA44CA44CAeW91cnMsDQo+IA0KPiDjgIDjgIDjgIDjgIDjgIDjgIDjgIDjgIBs aXV4aW4NCj4g44CA44CA44CA44CA44CA44CA44CA44CAbGl1eGluQGljdC5hYy5jbg0KPiDjgIDj gIDjgIDjgIDjgIDjgIDjgIDjgIDjgIDjgIAyMDA0LTAzLTA5DQo+IE5I56Wz6IaKdQTngao/LuiE vuafi3kNCj4gem3lronngJ/ulKLnppA/5r6C5aew57C3auKSjHblpoDngZZ2dj9tzr/vo7U/LeW9 qS7uhYDnhZ0/5r+Nfz8t6LqHYuiXj+6dhOW/n86p7p2G7oyp5qyWKOeTvV7ku4toDQo= |
|
From: liuxin <li...@ic...> - 2004-03-09 13:26:34
|
aGkgKjoNCiB3aGVyZSBjYW4gaSBnZXQgdGhlIHBldGNsaW5pYyBzb3VyY2UgY29kZSA/DQp0aGFu ayB5b3UgDQoJDQoNCqGhoaGhoaGhoaGhoaGhoaF5b3VycywJCQkJDQoNCqGhoaGhoaGhoaGhoaGh oaFsaXV4aW4NCqGhoaGhoaGhoaGhoaGhoaFsaXV4aW5AaWN0LmFjLmNuDQqhoaGhoaGhoaGhoaGh oaGhoaGhoTIwMDQtMDMtMDkNCg== |
|
From: Darren D. <da...@da...> - 2004-03-09 13:20:15
|
> Its me who is the doofus.. I didn't dig around enough to see the > superclass > ! > > Sorry about that. no worries. Let us know how the current code meets your existing needs; particularly whether your shared variables get exposed correctly to the FreeMarker template. We can then decide whether to add the stuff to the main source tree for 1.0-final (the FM guys are planning to release 2.3-RC1 any day now) or leave it in the sandbox until 1.1 Cheers! --=20 Darren Davison Public Key: http://www.davison.uk.net/key.jsp |
|
From: Cameron B. <ca...@da...> - 2004-03-09 11:58:29
|
Its me who is the doofus.. I didn't dig around enough to see the = superclass ! Sorry about that. I'll take a closer look next time before opening my mouth ;) Cameron > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of Darren Davison > Sent: Tuesday, 9 March 2004 8:41 PM > To: spr...@li... > Subject: Re: [Springframework-developer] FreeMarker >=20 > Actually it already *does* do this (as does the Velocity=20 > code). The classes in the web packages extend those in the=20 > ui package to provide the additional web functionality. >=20 > Cameron, did you look at the=20 > org.springframework.ui.freemarker package in the sandbox too,=20 > or have I misunderstood what you're asking? >=20 >=20 > > +1 - that's analogous to what we already have done for Velocity:=20 > > +There's > > the generic support in org.springframework.ui.velocity, plus the=20 > > web-specific classes in=20 > org.springframework.web.servlet.view.velocity. > > > > Note that Spring's "ui" package is very generic: It provides=20 > > functionality typically used in the user interface tier=20 > rather than in=20 > > core business logic, like support for themes and Velocity=20 > templates.=20 > > However, it does > > *not* provide support for specific user interface=20 > technologies: That's=20 > > the responsibility of the "web" and "rcp" packages, for example. > > > > Juergen > > > > > > ________________________________ > > > > Von: spr...@li...=20 > im Auftrag=20 > > von Cameron Braid > > Gesendet: Di 09.03.2004 08:28 > > An: spr...@li... > > Betreff: RE: [Springframework-developer] FreeMarker > > > > > > > > I havn't done any real integration with the sandbox code, but one=20 > > suggestion that I can make is to move the core freemarker=20 > > configuration classes from web into somewhere else, sice=20 > its not just=20 > > a web technology. > > > > I use freemarker for email generation as well as views. > > > > I would presume that the same can be said and done for=20 > velocity, even=20 > > xslt etc.. > > > > Cameron > > > > > > > >> -----Original Message----- > >> From: spr...@li... > >> [mailto:spr...@li...] > >> On Behalf Of Darren Davison > >> Sent: Saturday, 6 March 2004 6:12 AM > >> To: spr...@li... > >> Subject: [Springframework-developer] FreeMarker > >> > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> I've committed freemarker ui and view components to the sandbox as=20 > >> there are a couple of things still outstanding to do, and=20 > they're not=20 > >> fully tested. > >> > >> Cameron - if you're able to take a look and see if you can get the=20 > >> shared variables aspect working in your project that would be=20 > >> helpful. > >> > >> Specify a FreemarkerConfig bean in your servlet context=20 > file like so; > >> > >> <!-- freemarker config --> > >> <bean > >> id=3D"freemarkerConfig" > >> class=3D"org.springfr...view.freemarker.FreemarkerConfigurer" > >> > >> <!-- optional --> > >> <property name=3D"freemarkerSettings"> > >> <props> > >> <prop key=3D"localized_lookup">true</prop> > >> <!-- etc... --> > >> </props> > >> </property> > >> > >> <!-- optional --> > >> <map name=3D"freemarkerVariables"> > >> <entry key=3D"my_helper"> > >> <ref local=3D"freemarkerHelperObject"/> > >> </entry> > >> <!-- etc... --> > >> </map> > >> </bean> > >> > >> > >> > >> and similar to the following to define a view; > >> > >> fmView.class=3Dorg.springframework.web.servlet.view.freemarker.F > >> reemarkerView > >> # if you don't specify a templateContext,=20 > WEB-INF/freemarker will be=20 > >> # searched for templates fmView.templateContext=3DWEB-INF/ftl > >> fmView.url=3Dtest.ftl > >> > >> > >> > >> - -- > >> > >> Darren Davison > >> Public Key: http://www.davison.uk.net/key.jsp -----BEGIN PGP > >> SIGNATURE----- > >> Version: GnuPG v1.2.4 (GNU/Linux) > >> > >> iD8DBQFASN8IKLMLAN01aw0RAqClAJ4pPlH0MaHWvp2TPxk4j3/T6J3rqwCdG4ny > >> DOuc/+gNCQrVqZdPuFB7Ug0> =3DpFHR > >> -----END PGP SIGNATURE----- > >> > >> > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > >> tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > >> technologies. Learn everything from fundamentals to system=20 > >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > >> _______________________________________________ > >> Springframework-developer mailing list=20 > >> Spr...@li... > >>=20 > https://lists.sourceforge.net/lists/listinfo/springframework-develope > >> r > >> > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system=20 > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick > > _______________________________________________ > > Springframework-developer mailing list=20 > > Spr...@li... > >=20 > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux=20 > > tutorial presented by Daniel Robbins, President and CEO of GenToo=20 > > technologies. Learn everything from fundamentals to system=20 > > = administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > > _______________________________________________ > > Springframework-developer mailing list=20 > > Spr...@li... > >=20 > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > >=20 >=20 > -- > Darren Davison > Public Key: http://www.davison.uk.net/key.jsp >=20 >=20 >=20 > ------------------------------------------------------- > 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_id638&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 |
|
From: Darren D. <da...@da...> - 2004-03-09 10:58:22
|
Actually it already *does* do this (as does the Velocity code). The classes in the web packages extend those in the ui package to provide the additional web functionality. Cameron, did you look at the org.springframework.ui.freemarker package in the sandbox too, or have I misunderstood what you're asking? > +1 - that's analogous to what we already have done for Velocity: There'= s > the generic support in org.springframework.ui.velocity, plus the > web-specific classes in org.springframework.web.servlet.view.velocity. > > Note that Spring's "ui" package is very generic: It provides functional= ity > typically used in the user interface tier rather than in core business > logic, like support for themes and Velocity templates. However, it does > *not* provide support for specific user interface technologies: That's = the > responsibility of the "web" and "rcp" packages, for example. > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag v= on > Cameron Braid > Gesendet: Di 09.03.2004 08:28 > An: spr...@li... > Betreff: RE: [Springframework-developer] FreeMarker > > > > I havn't done any real integration with the sandbox code, but one > suggestion > that I can make is to move the core freemarker configuration classes fr= om > web into somewhere else, sice its not just a web technology. > > I use freemarker for email generation as well as views. > > I would presume that the same can be said and done for velocity, even x= slt > etc.. > > Cameron > > > >> -----Original Message----- >> From: spr...@li... >> [mailto:spr...@li...] >> On Behalf Of Darren Davison >> Sent: Saturday, 6 March 2004 6:12 AM >> To: spr...@li... >> Subject: [Springframework-developer] FreeMarker >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> I've committed freemarker ui and view components to the >> sandbox as there are a couple of things still outstanding to >> do, and they're not fully tested. >> >> Cameron - if you're able to take a look and see if you can >> get the shared variables aspect working in your project that >> would be helpful. >> >> Specify a FreemarkerConfig bean in your servlet context file like so; >> >> <!-- freemarker config --> >> <bean >> id=3D"freemarkerConfig" >> class=3D"org.springfr...view.freemarker.FreemarkerConfigurer" >> >> <!-- optional --> >> <property name=3D"freemarkerSettings"> >> <props> >> <prop key=3D"localized_lookup">true</prop> >> <!-- etc... --> >> </props> >> </property> >> >> <!-- optional --> >> <map name=3D"freemarkerVariables"> >> <entry key=3D"my_helper"> >> <ref local=3D"freemarkerHelperObject"/> >> </entry> >> <!-- etc... --> >> </map> >> </bean> >> >> >> >> and similar to the following to define a view; >> >> fmView.class=3Dorg.springframework.web.servlet.view.freemarker.F >> reemarkerView >> # if you don't specify a templateContext, WEB-INF/freemarker >> will be # searched for templates fmView.templateContext=3DWEB-INF/ftl >> fmView.url=3Dtest.ftl >> >> >> >> - -- >> >> Darren Davison >> Public Key: http://www.davison.uk.net/key.jsp -----BEGIN PGP >> SIGNATURE----- >> Version: GnuPG v1.2.4 (GNU/Linux) >> >> iD8DBQFASN8IKLMLAN01aw0RAqClAJ4pPlH0MaHWvp2TPxk4j3/T6J3rqwCdG4ny >> DOuc/+gNCQrVqZdPuFB7Ug0> =3DpFHR >> -----END PGP SIGNATURE----- >> >> >> ------------------------------------------------------- >> 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_id638&op=3D= ick >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> > > > > > ------------------------------------------------------- > 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_id638&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > 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_id638&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > --=20 Darren Davison Public Key: http://www.davison.uk.net/key.jsp |
|
From: <jue...@we...> - 2004-03-09 09:47:51
|
You *can* use the standard java.beans.PropertyEditorManager: Spring's = BeanWrapper does not use it to register custom editors, but it does = check it for property editors if no custom ones are found in the = BeanWrapper. As long as there are no overriding custom editors, = PropertyEditorManager's editors are used. =20 So it should indeed be possible to use the VM-wide PropertyEditorManager = here, as suggested by Guillaume! =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Alef Arendsen Gesendet: Fr 05.03.2004 17:19 An: spr...@li... Betreff: RE: [Springframework-developer] "permanantly" registering = property editor with BeanWrapper? Oops, I guess (no I don't guess, I know for sure ;-) manually = instantiating a BeanWrapperImpl won't give you the additional PropertyEditors = registered through CustomEditorConfigurer, if that's what you meant! The = BeanWrapper doesn't know of anything like an ApplicationContext when just = instantiating it. I'm using the BeanWrapperImpl in some rare cases as well (same reason, = it's really convenient). I wouldn't know how to add additional custom editors to beanwrappers instantiated manually. The solution Guillaume is suggesting (with Sun's PropertyManager) will not work; since Spring doesn't use it (security restrictions might give problems there). Alef > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On = Behalf > Of Chris Winters > Sent: Friday, March 05, 2004 4:58 PM > To: spr...@li... > Subject: Re: [Springframework-developer] "permanantly" registering > property editor with BeanWrapper? > > Alef Arendsen wrote: > > It's not possible to do this via a static on the BeanWrapper. It IS > possible > > however... > > > > J=FCrgen added a CustomEditorConfigurer that you can use to do this. = Just > add > > it to you app context and you're done. > > > > <!-- taken from JavaDOC --> > > <bean id=3D"customEditorConfigurer" > > ... > > Excellent! That should work just fine. > > > If you're programmatically using the BeanFactory, you can add > > propertyeditors using registerCustomEditor from the BeanFactory (or = use > a > > BeanFactoryPostProcessor). > > This is what I started doing, but if I instantiate a > BeanWrapperImpl myself the editors aren't available. (I'm just > using the BeanWrapper as a shortcut to do some property mapping > because it's so darned convenient.) > > Plus I'm not sure how to do this from an ApplicationContext vs. a > BeanFactory -- the registerCustomEditor() seems to be implemented > in AbstractBeanFactory which doesn't seem to be a parent of any > ApplicationContext class. (I'm a little hazy on the relationships > among the objects at this level tho.) > > Thanks! > > Chris > > -- > Chris Winters (cwi...@op...) > Senior Software Architect > > > ------------------------------------------------------- > 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_id638&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- 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_id638&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-03-09 08:25:38
|
+1 - that's analogous to what we already have done for Velocity: There's = the generic support in org.springframework.ui.velocity, plus the = web-specific classes in org.springframework.web.servlet.view.velocity. =20 Note that Spring's "ui" package is very generic: It provides = functionality typically used in the user interface tier rather than in = core business logic, like support for themes and Velocity templates. = However, it does *not* provide support for specific user interface = technologies: That's the responsibility of the "web" and "rcp" packages, = for example. =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von Cameron Braid Gesendet: Di 09.03.2004 08:28 An: spr...@li... Betreff: RE: [Springframework-developer] FreeMarker I havn't done any real integration with the sandbox code, but one = suggestion that I can make is to move the core freemarker configuration classes = from web into somewhere else, sice its not just a web technology. I use freemarker for email generation as well as views. I would presume that the same can be said and done for velocity, even = xslt etc.. Cameron > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] > On Behalf Of Darren Davison > Sent: Saturday, 6 March 2004 6:12 AM > To: spr...@li... > Subject: [Springframework-developer] FreeMarker > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I've committed freemarker ui and view components to the > sandbox as there are a couple of things still outstanding to > do, and they're not fully tested. > > Cameron - if you're able to take a look and see if you can > get the shared variables aspect working in your project that > would be helpful. > > Specify a FreemarkerConfig bean in your servlet context file like so; > > <!-- freemarker config --> > <bean > id=3D"freemarkerConfig" > class=3D"org.springfr...view.freemarker.FreemarkerConfigurer" > > <!-- optional --> > <property name=3D"freemarkerSettings"> > <props> > <prop key=3D"localized_lookup">true</prop> > <!-- etc... --> > </props> > </property> > > <!-- optional --> > <map name=3D"freemarkerVariables"> > <entry key=3D"my_helper"> > <ref local=3D"freemarkerHelperObject"/> > </entry> > <!-- etc... --> > </map> > </bean> > > > > and similar to the following to define a view; > > fmView.class=3Dorg.springframework.web.servlet.view.freemarker.F > reemarkerView > # if you don't specify a templateContext, WEB-INF/freemarker > will be # searched for templates fmView.templateContext=3DWEB-INF/ftl > fmView.url=3Dtest.ftl > > > > - -- > > Darren Davison > Public Key: http://www.davison.uk.net/key.jsp -----BEGIN PGP > SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iD8DBQFASN8IKLMLAN01aw0RAqClAJ4pPlH0MaHWvp2TPxk4j3/T6J3rqwCdG4ny > DOuc/+gNCQrVqZdPuFB7Ug0=3D > =3DpFHR > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > 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_id638&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- 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_id638&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Arto P. <art...@of...> - 2004-03-09 08:18:35
|
Ok. I can access those by adding localeResolver, etc. to that xml file (whatever it is called), and using webapplicationcontext. Maby there is someday more generic servlet meant to extend, but which contains more funtionality that FrameworkServlet. Artsi On Tue, 2004-03-09 at 09:40, Arto Pastinen wrote: > Hi! > > Is there been any issues about adding getter/setter dispatcher servlet's > private fields? > > I just started to make one servlet, which will need all functionality > that dispatcher servlet's contains, expect doService method, which i > will write again, and i decided to extend my servlet from it. The > problem is now, that i cannot access some fields, becuse they are > private.. or should i just write all resolver, etc. stuff again? > > Artsi > > > > ------------------------------------------------------- > 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 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Arto P. <art...@of...> - 2004-03-09 07:53:53
|
Hi! Is there been any issues about adding getter/setter dispatcher servlet's private fields? I just started to make one servlet, which will need all functionality that dispatcher servlet's contains, expect doService method, which i will write again, and i decided to extend my servlet from it. The problem is now, that i cannot access some fields, becuse they are private.. or should i just write all resolver, etc. stuff again? Artsi |