|
From: Alef A. <al...@jt...> - 2004-06-30 23:32:45
|
I don't know,
I've searched a bit through my email archives and have attached a couple
of mail related to the introduction of the dependency checking features.
I think we (or however implemented this) chose to have a default
attributes to allow for future modification of the default if needed??
Alef
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...] On
Behalf
> Of Colin Sampaleanu
> Sent: Thursday, July 01, 2004 1:01 AM
> To: spr...@li...
> Subject: [Springframework-developer] Anybody know historical purpose
of
> dependency-check 'default' value?
>=20
> I'm trying to figure out why the DTD allows both 'none' and 'default'
> for the dependency-check attribute.
>=20
> <!--
> Optional attribute controlling whether to check whether all this
> beans dependencies, expressed in its properties, are satisfied.
> Default is no dependency checking.
>=20
> "simple" type dependency checking includes primitives and String
> "object" includes collaborators (other beans in the factory)
> "all" includes both types of dependency checking
> -->
> <!ATTLIST bean dependency-check (none | objects | simple | all |
> default) "default">
>=20
> If you look at the code, none is the default (when nothing is
> specified). 'default gets treated exactly like none, but it seems
almost
> like an accident.
>=20
> protected int getDependencyCheck(String att) {
> int dependencyCheckCode =3D
> RootBeanDefinition.DEPENDENCY_CHECK_NONE;
> if (DEPENDENCY_CHECK_ALL_ATTRIBUTE_VALUE.equals(att)) {
> dependencyCheckCode =3D
RootBeanDefinition.DEPENDENCY_CHECK_ALL;
> }
> else if (DEPENDENCY_CHECK_SIMPLE_ATTRIBUTE_VALUE.equals(att))
{
> dependencyCheckCode =3D
> RootBeanDefinition.DEPENDENCY_CHECK_SIMPLE;
> }
> else if (DEPENDENCY_CHECK_OBJECTS_ATTRIBUTE_VALUE.equals(att))
{
> dependencyCheckCode =3D
> RootBeanDefinition.DEPENDENCY_CHECK_OBJECTS;
> }
> // else leave default value
> return dependencyCheckCode;
> }
>=20
> Is 'default' still needed?
>=20
> Colin
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>=20
>=20
|