Leif Mortenson wrote:
Berlin,
I have been trying to dig in and figure out how to get the Fortress to use
the Meta information but have not been having much success. I have not
been able to find any place where the process is described.


I have been able to generate meta information for my services by using
the following task in my build.xml file:
<taskdef name="collect-metainfo" classname="org.apache.avalon.fortress.tools.ComponentMetaInfoCollector">
<classpath>
<path refid="project.class.path"/>
</classpath>
</taskdef>
<collect-metainfo destdir="${build.classes}">
<fileset dir="${src.dir}"/>
</collect-metainfo>


This will collect the meta information for all of the classes in the current
project. But how do you collect meta information for classes like
JdbcDataSource? They appear to have the meta information defined in
their source, but the jar files do not currently contain any meta info. This
makes me think that I am missing something.

Right now, that is taken care of by the FortressRoleManager. If you don't specify any role managers in your system, this will be created for you anyway. In the future the datasource jars will have all the required information.


Second. How do I tell Fortress to make use of the meta information
in the Jars. Up until this point, I have been specifying a roles config file
and using the RoleManager. From digging around in the code, It looks
like I want to be using the ServiceMetaManager, but have not yet figured
out how to tell Fortress to use it.

Fortress will always use the MetaInfoManger. Unless you override the MetaInfoManager, the ContextManager will create a new ServiceMetaInfoManger which uses all the stuff that the ANT task generates. The ServiceMetaInfoManager wraps any RoleManager (or the root FortressRoleManager) in the default context.

In short--it always uses it.


Sorry if I am missing something obvious. After too many hours of looking
through code and list archives, something is just refusing to click :-/ Things
may make more sense in the morning.


Any help would be appreciated.
Cheers,
Leif

The code is being cleaned up to be a bit easier on the eyes.



-- "You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, The Swiss hold the America's Cup, France is accusing the US of arrogance, and Germany doesn't want to go to war. And the 3 most powerful men in America are named 'Bush', 'Dick', and 'Colon' (sic)".

-----Chris Rock


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to