Re: Metadata Compiler

Jonas Bonér <[email protected]> Tue, 22 Apr 2003 07:52:57 +0200
Newsgroups gmane.comp.java.aspectwerkz
Message-ID <[email protected]>
Hi Shiyiying.

You seem to have understood the code pretty well :-)

Yes. You have to compile meta-data for the application before you run it
(even though you don't have any introductions).

I made this change mainly due to performance reasons. Now the startup
process is much faster, since all parsing and decision taking is made in
a previous step. This approach is also much more flexible. For example
was it *really* simple to add runtime attributes to the system using the
new model.

If this is unacceptable to you there is of course a possibility to embed
this compilation process in the startup process.

The meta-data compilation only needs to be called when you change code
that is advised or the definition (xml and/or attributes). You tell the
system where it is by feeding it with the -Daspectwerkz.metadata.dir=...
parameter.

The system checks for a new weave model at runtime. So it should be
possible to change the definition (xml and/or attributes) without
restarting it. :-)

Sincerely, Jonas.


 娑 wrote:
> Hi Jonas:
> I check out lastest aspectwerkz from CVS yesterday, and found some test 
> application I build  cannot run.Aspectwerk complain me that 
> _metaData\weaveModel.ser is missing.
> I go to source code and find in almost every transformer component ,
> private final AspectWerkzDefinition m_definition =
> Dom4jXmlDefinitionParser.parse(DefinitionManager.loadDefinitionFile());
> 
> has been replaced by    private WeaveModel m_weaveModel = 
> WeaveModel.loadModel();
> 
> and loadModule() must go to find a previous serialized WeaveModel.This 
> WeaveModule is generated by SourceMetaDataCompiler or 
> SourceMetaDataCompiler.
> 
> I wonder if we must compile metadata before we can run.(I remember in 
> you site's document , metadata complication is only needed when we use 
> introduction).
> 
> Best regards!
> Shiyiying
> 
> 
> 
> 
> 
> 
> 
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> aspectwerkz-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aspectwerkz-developer
> 
> 


-- 
Jonas
http://freeroller.net/page/jboner





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf