1>why there is an org.apache.avalon.fortress.Container in fortress? what is this Container for? because I think what ComponentManager and ComponentSelector do in ECM can be totally done by SericeManager and ServiceSelector that are encouraged to use in fortress, and, besides, what is ComponentHandler for in fortress, how to use it
2> It mentions in 'Use meta info' on fortress page on avalon site that the 'roles' files are not encouraged to use in fortress, instead, fortress use javadoc meta information to get meta information for a Service,I did the following:
this is my build.xml file
<?xml version="1.0" encoding="GB2312" ?> <project default="dist" basedir="."> <property environment="env"/> <property name="java.home" value="${env.JAVA_HOME}"/> <property name="ant.home" value="${env.ANT_HOME}"/> <property name="src.dir" value="src"/> <property name="build.dir" value="build" /> <property name="build.classes" value="${build.dir}/classes"/>
<taskdef name="collect-metainfo" classname="org.apache.avalon.fortress.tools.C omponentMetaInfoCollector"> <classpath> <pathelement location="fortress-tools.jar"/> <pathelement location="qdox-1.3.jar"/> </classpath> </taskdef>
<target name="compile" description="Compiles the source code"> <mkdir dir="${build.classes}"/> <javac srcdir="${src.dir}" destdir="${build.classes}"> <classpath> <fileset dir="." includes="*.jar"/> <pathelement location="${java.home}"/> <pathelement location="${ant.home}"/> </classpath> </javac> <collect-metainfo destdir="${build.classes}"> <fileset dir="${src.dir}"/> </collect-metainfo> </target> </project>
and I put these jar files in the "." (current dir) directory
in the /src dir , I have two files got from excalibur-fortress-1.0\examples\src\java\org\apache\avalon\fortress\examples\components
they are Translator.java and TranslatorImpl.java
avalon-framework-4.1.4.jar excalibur-fortress-complete-1.0.jar fortress-tools.jar qdox-1.3.jar
I ran the build file and got the exception:
java.lang.IncompatibleClassChangeError at org.apache.avalon.fortress.tools.Component.<init>(Component.java:12 4)
at org.apache.avalon.fortress.tools.ComponentMetaInfoCollector.collect In foMetaData(ComponentMetaInfoCollector.java:226) at org.apache.avalon.fortress.tools.ComponentMetaInfoCollector.execute (C omponentMetaInfoCollector.java:122) at org.apache.tools.ant.Task.perform(Task.java:341) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1339) at org.apache.tools.ant.Project.executeTargets(Project.java:1255) at org.apache.tools.ant.Main.runBuild(Main.java:609) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235)
Total time: 2 seconds java.lang.IncompatibleClassChangeError at org.apache.avalon.fortress.tools.Component.<init>(Component.java:12 4)
at org.apache.avalon.fortress.tools.ComponentMetaInfoCollector.collect In foMetaData(ComponentMetaInfoCollector.java:226) at org.apache.avalon.fortress.tools.ComponentMetaInfoCollector.execute (C omponentMetaInfoCollector.java:122) at org.apache.tools.ant.Task.perform(Task.java:341) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:336) at org.apache.tools.ant.Project.executeTarget(Project.java:1339) at org.apache.tools.ant.Project.executeTargets(Project.java:1255) at org.apache.tools.ant.Main.runBuild(Main.java:609) at org.apache.tools.ant.Main.start(Main.java:196) at org.apache.tools.ant.Main.main(Main.java:235)
When I did this , I just tried to see what files the ComponentMetaInfoCollector can generate and how they differ from the orginal roles files of ECM.
So anyone can be so nice to tell me why the exceptions occured?
3> what is the MetaInfoManager for in fortress? how to use it? and why there is still a RoleManage in fortress? is it still of use?
I m sorry to ask so many 'simple' questions, yet I m really at a loss to know how to transfer my code that exploits ECM to code using fortress idea.
Thanks
_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]