Hi,
To use cfg file you need:
- File install configured on a folder (let's say 'foo')
- A configuration admin implementation (like the Apache Felix one :-))
Then, create a cfg file named factory-name-id. The factory name is
generally the class name of your pojo.
In this file, add one line per property:
prop1=value1
prop2=value2
Copy this file in the 'foo' folder, that's it:
File install will read the file and push the configuration in the
configuration admin.
The configuration admin will push the configuration to iPOJO
iPOJO will create the instance and configure it (i.e you don't need
metadata.xml file at all)
Regards,
Clement
On 30.03.2009, at 20:26, Stuart McCulloch wrote:
2009/3/30 Joel Schuster <[email protected]>
I've started using PaxLogging as my LogService. However, I can't
seem to
figure out how to configure it.
you need to configure it via the ConfigAdmin service using a
configuration
pid "org.ops4j.pax.logging"
to point to the contents of the log4j properties file - you can do
this
using Pax ConfMan or FileInstall
from Apache Felix (both let you associate properties files with
configuration pids)
http://wiki.ops4j.org/display/ops4j/Pax+Logging#PaxLogging-Configuration
you'll also need a working ConfigAdmin implementation, such as the
Apache
Felix configadmin bundle
HTH
I've tried creating various cfg files to no avail.
As a an attempt to better understand how this should work I've
created a
quick iPOJO based LogClient which @Requires the LogService.
This works great, so I added a String based @Property.
However, I can't seem to set the property outside of the
metadata.xml file.
Shouldn't I be able to create a cfg file?
If I can get that working it seems I should then be able to figure
out a
cfg file for the PaxLogging too.
I'll let Clement answer the iPOJO specifics, but as long as you can
associate the "org.ops4j.pax.logging"
configuration pid to the log4j properties using iPOJO then it's just a
matter of making sure you have a
ConfigAdmin implementation installed to pass the configuration onto
the
Pax-Logging service
(note you also need both the Pax-Logging API and the Pax-Logging
service
bundles installed)
______________________________
Joel Schuster
Senior Software Engineer
NAVSYS Corporation
14960 Woodcarver Road
Colorado Springs, CO 80921
(719) 481-4877 x138
[email protected]<mailto:[email protected]>
The information contained herein is confidential and intended
solely for
the use of the addressees. If the reader is not the intended
recipient, you
are hereby notified that any distribution or copying of this
communication
is prohibited. Further distribution without the sender's approval
is also
prohibited. If you have received this communication in error,
please notify
us immediately by replying to the message and deleting it entirely
from your
computer. Thank you. NAVSYS Corporation.
--
Cheers, Stuart
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]