This also gave a good primer on how the expression stuff is done and  
which structures of aspectwerkz are used for it, very good stuff :-)

On 18 Jul 2007, at 02:24, Tim Eck wrote:

> Thanks Eugene, I did everything feasible from your suggestions.
>
> I also stumbled upon a bug – JavaClassInfo.getFields() always just  
> to throw ClassCastException since it was iterating over methods J. I  
> fixed that and also made it keep a lazy copy like AsmClassInfo.
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> ] On Behalf Of Eugene Kuleshov
> Sent: Tuesday, July 17, 2007 12:04 PM
> To: [email protected]
> Subject: [tc-dev] [Fwd: [Tc-commits] teck [4464] allow roots to be  
> specified with expressions
>
>
>   Great stuff Tim!
>
>   Here are few comments related to the usage of ClassInfo API.
>
>   You used java.lang.reflect.Field for matching in  
> ManagerImpl.isRoot(). Wouldn't it be better to use FieldInfo instead?
>   I think if you have Filed field then declaring Class has to be  
> loaded, so if you do want to use Field, it is probably better to use  
> JavaFieldInfo instead of AsmFieldInfo in the ManagerImpl.isRoot();  
> (this one will work trough reflection)
>
>   Code in TransparencyCodeAdapter.isRoot() that is using  
> AsmClassInfo.getclassInfo(className, ...) is potentially dangerous,  
> because of the classloading issues. Maybe it is better to pass the  
> actual classInfo around (if we have it).
>
>   In DSOClientConfigHelper.isRootDSOFinal(FieldInfo fi, boolean  
> isPrimitive) parameter isPrimitive is redundant because it can be  
> retrieved from fi.getType().isPrimitive();
>
>   The way to enforce one or the other element in the xsd is to use  
> xs:choice:
>
>
>
>   <xs:complexType name="root">
>     <xs:sequence>
>       <xs:element name="root-name" type="java-identifier"  
> minOccurs="0"/>
>       <xs:choice>
>         <xs:element name="field-name" type="qualified-field-name"/>
>         <xs:element name="field-expression" type="field-expression"/>
>       </xs:choice>
>     </xs:sequence>
>   </xs:complexType>
>
>   but I am not sure if xbeans actually can swallow that. Also, I  
> really hope we could move from element-based schema to the attribute- 
> based, though you won't be able to enforce such constructs for  
> attributes (and probably will have to use different element name  
> instead, i.e. <root-field name="" field=""/> vs. <root-expression  
> name="" expression=""/>).
>
>   regards,
>   Eugene
>
>
> -------- Original Message --------
> Subject:
> [Tc-commits] teck [4464] allow roots to be specified with  
> expressions (ie.
> Date:
> Tue, 17 Jul 2007 11:25:08 -0700 (PDT)
> From:
> [EMAIL PROTECTED]
> Reply-To:
> [EMAIL PROTECTED]
> To:
> [EMAIL PROTECTED]
>
> Revision
> 4464
> Author
> teck
> Date
> 2007-07-17 11:25:08 -0700 (Tue, 17 Jul 2007)
> Log Message
> allow roots to be specified with expressions (ie. wilcards,  
> annotations, subtypes, etc)
> Modified Paths
>       • dso/branches/2.4/code/base/common/lib/tcconfig-xmlbeans- 
> generated.jar
>       • dso/branches/2.4/code/base/common/src.resources/com/tc/config/ 
> schema/terracotta-4.xsd
>       • dso/branches/2.4/code/base/dso-container-tests/tests.base/com/tc/ 
> test/server/appserver/unit/AbstractAppServerTestCase.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> ClassAdapterBase.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> InstrumentationSpec.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> Manager.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> ManagerImpl.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> ManagerUtil.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> NullManager.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> TransparencyClassAdapter.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/bytecode/ 
> TransparencyCodeAdapter.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/config/ 
> ConfigLoader.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/config/ 
> DSOClientConfigHelper.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/config/ 
> Root.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/config/ 
> StandardDSOClientConfigHelper.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/object/config/ 
> TransparencyClassSpec.java
>       • dso/branches/2.4/code/base/dso-l1/src/com/tc/util/FieldUtils.java
>       • dso/branches/2.4/code/base/dso-spring/tests.unit/com/tctest/ 
> spring/InitializingBean_Test.java
>       • dso/branches/2.4/code/base/dso-spring/tests.unit/com/tctest/ 
> spring/MultipleContexts_Test.java
>       • dso/branches/2.4/code/base/dso-spring/tests.unit/com/tctest/ 
> spring/Singleton2_Test.java
>       • dso/branches/2.4/code/base/dso-spring/tests.unit/com/tctest/ 
> spring/Singleton_Test.java
>       • dso/branches/2.4/code/base/dso-spring/tests.unit/com/tctest/ 
> spring/WebAppContext_Test.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> LockUpgrade1Reads1UpgradesTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> LockUpgradeAndReadTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> LockUpgradeSystemTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> ReflectionArrayTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> ReflectionFieldTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> SingleVMWaitNotifyTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> TransparentLinkedListTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> TransparentSetTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> TransparentTransientTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> TransparentVectorTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> TransparentWaitNotifyApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> WaitNotifySystemTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> restart/unit/DSOServerRestartTestApp.java
>       • dso/branches/2.4/code/base/dso-system-tests/tests.base/com/tctest/ 
> transparency/InnerClassInstrumentationTestApp.java
>       • dso/branches/2.4/code/base/dso-tests-jdk15/tests.system/com/ 
> tctest/AnnotationTestApp.java
>       • dso/branches/2.4/code/base/simulator/tests.base/com/tcsimulator/ 
> ControlProviderImpl.java
>       • dso/branches/2.4/kits/source/docs/references/tc-config- 
> reference.xml
>
> _______________________________________________
> tc-dev mailing list
> [email protected]
> http://lists.terracotta.org/mailman/listinfo/tc-dev

--
Geert Bevin
Terracotta - http://www.terracotta.org
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com

_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to