On Fri, 2004-03-26 at 19:31, J Aaron Farr wrote:Your logkit file should be just fine.
Can I use log4j only ?
You can use log4j. Are you already using LogKit or Log4J? Do your ECM components use the Avalon LogEnabled lifecycle?
There will be slight changes to the roles.xconf and system.xconf files.
Np. Why I should have a roles.xconf file describing my roles, if that info is present on my system.xconf.xml file ?
You don't have to use a 'roles' file. You can use meta-data instead. How are you establishing the ECM RoleManager now? I suppose I assumed you were already using a role file.
The role file (or meta-data) contains information similar to the system.xconf file but not identical information. Simply put the role file matches class implementations to service interfaces and gives each one a "shortcut" alias name. The system.xconf file specifies which components will actually be loaded, how many of them (perhaps you have two datasource components), and applies configuration information to each.
So they are slightly different. In Merlin-speak this would be equivilant to the difference between meta-info (role file) and meta-data (system file).
<my-system> <component id="1" role= "br.com.ibnetwork.xingu.logging.LoggerFactory" class="br.com.ibnetwork.xingu.logging.impl.Log4JLoggerFactoryImpl"> <log4j.properties>log4.properties</log4j.properties> </component>
<component id="2" role= "br.com.ibnetwork.xingu.ojb.OJBComponent" class="br.com.ibnetwork.xingu.ojb.impl.OJBComponentImpl"> <jcd-alias>@PERSISTENCE_JCD-ALIAS@</jcd-alias> </component> </my-system>
Okay, I see now. You can embedd your roles info into your system info, but since the data is really different types (meta-info vs meta-data) we encourage you to split it into two different files:
<roles logger="system.roles">
<role name="br.com.ibnetwork.xingu.logging.LoggerFactory">
<component shorthand="logger-factory"
class="br.com.ibnetwork.xingu.logging.impl.Log4JLoggerFactoryImpl"
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"/>
</role> <role name="br.com.ibnetwork.xingu.ojb.OJBComponent">
<component shorthand="ojb"
class="br.com.ibnetwork.xingu.ojb.impl.OJBComponentImpl"
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler/>
</role></roles>
<system> <logger-factory id="1"> <log4j.properties>log4.properties</log4j.properties> </logger-factory>
<ojb id="2">
<jcd-alias>@PERSISTENCE_JCD-ALIAS@</jcd-alias>
</ojb>
</system>I believe that should be the fortress equivalent.
Q1) Can I use numeric ids ?
Yes. Though really they'll just be treated as Strings.
Q2) Do I have to use @tags on my Java files ? or this is optional ?
Optional.
not sure. can I send you the class I'm using to do that ?
Here is about as simple an example as you can find:
http://cvs.apache.org/viewcvs.cgi/avalon-sandbox/examples/fortress/standalone/src/java/org/apache/avalon/examples/fortress/FortressStandalone.java?rev=1.1&view=markup
-- jaaron
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
