Re: Some tips on how to create a feature
Hi Christiano, I've just posted up some code I'm using for a Webinar on Thursday on 'Securing CXF Web Services with SSL/TLS and WS-Security' and it's got a concise enough features project in it. You can get the code at from the GIT repository at http://sparks.fusesource.com If you're interested in attending the webinar, the link for the EMEA session is http://tinyurl.com/3v9fb3q and for the US session is http://tinyurl.com/3m65n34 Enjoy! Ade On 05/04/2011 23:09, Cristiano Gavião wrote: Hi, could someone point me to a complete example project that shows me how to create a feature ? I'm trying to figure out it reading the doc page (http://karaf.apache.org/manual/2.1.99-SNAPSHOT/developers-guide/features-maven-plugin.html) but I couldn't yet. thanks Cristiano
Using custom log4j appenders under Karaf 2.1.4
Hi, Are there any examples available showing how to use custom log4j appenders under Karaf? I see in the users guide the following note: If you plan to use your own appenders, you need to create an OSGi bundle and attach it as a fragment to the bundle with a symbolic name of org.ops4j.pax.logging.pax-logging-service. This way, the underlying logging system will be able to see and use your appenders. We have a custom remoting logging appender we wish to utilize with our project hosted in Karaf 2.1.4. I am assuming we turn our appenders jar into a bundle with the fragment host set to org.ops4j.pax.logging.pax-logging-service and deployed with our project. Is that correct? How do you recommend handling multiple log4j.xml files for each deployment environment such as development, staging, and production. Thanks. -Mike- -- View this message in context: http://karaf.922171.n3.nabble.com/Using-custom-log4j-appenders-under-Karaf-2-1-4-tp2781811p2781811.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Some tips on how to create a feature
Hi Ade, I'll take a look... thanks Cristiano On 05/04/11 18:16, Adrian Trenaman wrote: Hi Christiano, I've just posted up some code I'm using for a Webinar on Thursday on 'Securing CXF Web Services with SSL/TLS and WS-Security' and it's got a concise enough features project in it. You can get the code at from the GIT repository at http://sparks.fusesource.com If you're interested in attending the webinar, the link for the EMEA session is http://tinyurl.com/3v9fb3q and for the US session is http://tinyurl.com/3m65n34 Enjoy! Ade On 05/04/2011 23:09, Cristiano Gavião wrote: Hi, could someone point me to a complete example project that shows me how to create a feature ? I'm trying to figure out it reading the doc page (http://karaf.apache.org/manual/2.1.99-SNAPSHOT/developers-guide/features-maven-plugin.html) but I couldn't yet. thanks Cristiano
Re: Some tips on how to create a feature
Hi David, thanks for your opinion ... I'll take a look too... It's Karaf 3 available on svn as trunk ? Do you have any info about release dates of it ? cheers Cristiano On 05/04/11 18:23, David Jencks wrote: iMO the realistic options are to write it by hand or to use karaf 3 (which is under rapid development in this area) Examples of karaf 3 features are (in karaf) assemblies/features/framework (this constructs a kar file that is the contents of a minimal karaf server; it's turned into a server in assemblies/apache-karaf-minimal) and (in my geronimo sandbox at https://svn.apache.org/repos/asf/geronimo/sandbox/djencks/txmanager) the org.apache.geronimo. projects which construct a couple features to try out the karaf-maven-plugin. Here, there's also a sample server that deploys these features. I didn't understand the karaf 2.x feature doc either. thanks david jencks On Apr 5, 2011, at 2:09 PM, Cristiano Gavião wrote: Hi, could someone point me to a complete example project that shows me how to create a feature ? I'm trying to figure out it reading the doc page (http://karaf.apache.org/manual/2.1.99-SNAPSHOT/developers-guide/features-maven-plugin.html) but I couldn't yet. thanks Cristiano
Re: Looking for bundle service to download a maven artifact
L.S., Since the mvn: URL handler is available to you when you're running your code inside the container, you should be able to just create a URL instance and read from its InputStream. Something like URL url = new URL(mvn:commons-codec/commons-codec/1.4) InputStream is = url.openConnection().getInputStream() // now read from the stream and write the bytes to a FileOutputStream Regards, Gert Vanthienen FuseSource Web: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ On Tue, Apr 5, 2011 at 7:46 AM, Dan Tran dant...@gmail.com wrote: I was hoping to to take advantage of the service that already aware of org.ops4j.pax.url.mvn.cfg -Dan On Mon, Apr 4, 2011 at 10:35 PM, Andreas Pieber anpie...@gmail.com wrote: hey dan, for that uc I am afraid the features service is not sufficient. I think it is best to directly take the aether libs. kind regards, Andreas On Apr 5, 2011 5:32 AM, Dan Tran dant...@gmail.com wrote: Hi Andreas, I just need to download any arbitrary artifact ( for example mvn:commons-codec/commons-codec/1.4 ), to a specify directory under karaf On Mon, Apr 4, 2011 at 8:15 PM, Andreas Pieber anpie...@gmail.com wrote: Hey Dan, I assume you're looking for org.apache.karaf.features.FeaturesService [1]. Simply add the following to your blueprint file to use it: reference id=featuresService interface=org.apache.karaf.features.FeaturesService / Hope this helps and kind regards, Andreas [1] http://svn.apache.org/repos/asf/karaf/trunk/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java On Tue, Apr 5, 2011 at 2:57 AM, Dan Tran dant...@gmail.com wrote: Hi Karaf can download and install features with bundles using mvn:xxx url. Does that interface ( service ) expose somewhere? so that I can download a given maven artifact into karaf's local disk space, to be processed later? Thanks for all the help. -Dan
Re: Some tips on how to create a feature
Hi Adrian, I couldn't reach this address http://sparks.fusesource.com, but I've found this http://fusesource.com/forge/projects/sparks/source But besides the fact this page state that: This project can be cloned anonymously using the following URL: http://fusesource.com/forge/git/sparks.git/ It ask me to authenticate.. :-s I will try to use the git online browsing... cheers On 05/04/11 18:16, Adrian Trenaman wrote: Hi Christiano, I've just posted up some code I'm using for a Webinar on Thursday on 'Securing CXF Web Services with SSL/TLS and WS-Security' and it's got a concise enough features project in it. You can get the code at from the GIT repository at http://sparks.fusesource.com If you're interested in attending the webinar, the link for the EMEA session is http://tinyurl.com/3v9fb3q and for the US session is http://tinyurl.com/3m65n34 Enjoy! Ade On 05/04/2011 23:09, Cristiano Gavião wrote: Hi, could someone point me to a complete example project that shows me how to create a feature ? I'm trying to figure out it reading the doc page (http://karaf.apache.org/manual/2.1.99-SNAPSHOT/developers-guide/features-maven-plugin.html) but I couldn't yet. thanks Cristiano
Re: Using custom log4j appenders under Karaf 2.1.4
On Tue, Apr 5, 2011 at 23:43, mgardiner gardin...@familysearch.org wrote: Hi, Are there any examples available showing how to use custom log4j appenders under Karaf? I see in the users guide the following note: If you plan to use your own appenders, you need to create an OSGi bundle and attach it as a fragment to the bundle with a symbolic name of org.ops4j.pax.logging.pax-logging-service. This way, the underlying logging system will be able to see and use your appenders. We have a custom remoting logging appender we wish to utilize with our project hosted in Karaf 2.1.4. I am assuming we turn our appenders jar into a bundle with the fragment host set to org.ops4j.pax.logging.pax-logging-service and deployed with our project. Is that correct? Yep, that's correct. How do you recommend handling multiple log4j.xml files for each deployment environment such as development, staging, and production. Good question. We don't usually use xml files for log4j but rather the configuration based ones. Take a look at the etc/org.ops4j.pax.logging.cfg file which is actually a log4j config file. That file will be used to configure log4j, so you should only touch that file and configure it differently between your environments I think; Thanks. -Mike- -- View this message in context: http://karaf.922171.n3.nabble.com/Using-custom-log4j-appenders-under-Karaf-2-1-4-tp2781811p2781811.html Sent from the Karaf - User mailing list archive at Nabble.com. -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/ Open Source SOA http://fusesource.com
Re: Looking for bundle service to download a maven artifact
coolest. Thanks for all the helps -D On Tue, Apr 5, 2011 at 6:30 PM, Guillaume Nodet gno...@gmail.com wrote: Yes. From the karaf console just try: shell:cat mvn:org.apache.karaf.assemblies.features/standard/2.2.0-SNAPSHOT/xml/features It will work and it just creates a java.net.URL and display the content. On Wed, Apr 6, 2011 at 00:00, Dan Tran dant...@gmail.com wrote: umm, standard URL class understand karaf's maven specific url? Thanks -Dan On Tue, Apr 5, 2011 at 2:57 PM, Gert Vanthienen gert.vanthie...@gmail.com wrote: L.S., Since the mvn: URL handler is available to you when you're running your code inside the container, you should be able to just create a URL instance and read from its InputStream. Something like URL url = new URL(mvn:commons-codec/commons-codec/1.4) InputStream is = url.openConnection().getInputStream() // now read from the stream and write the bytes to a FileOutputStream Regards, Gert Vanthienen FuseSource Web: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ On Tue, Apr 5, 2011 at 7:46 AM, Dan Tran dant...@gmail.com wrote: I was hoping to to take advantage of the service that already aware of org.ops4j.pax.url.mvn.cfg -Dan On Mon, Apr 4, 2011 at 10:35 PM, Andreas Pieber anpie...@gmail.com wrote: hey dan, for that uc I am afraid the features service is not sufficient. I think it is best to directly take the aether libs. kind regards, Andreas On Apr 5, 2011 5:32 AM, Dan Tran dant...@gmail.com wrote: Hi Andreas, I just need to download any arbitrary artifact ( for example mvn:commons-codec/commons-codec/1.4 ), to a specify directory under karaf On Mon, Apr 4, 2011 at 8:15 PM, Andreas Pieber anpie...@gmail.com wrote: Hey Dan, I assume you're looking for org.apache.karaf.features.FeaturesService [1]. Simply add the following to your blueprint file to use it: reference id=featuresService interface=org.apache.karaf.features.FeaturesService / Hope this helps and kind regards, Andreas [1] http://svn.apache.org/repos/asf/karaf/trunk/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java On Tue, Apr 5, 2011 at 2:57 AM, Dan Tran dant...@gmail.com wrote: Hi Karaf can download and install features with bundles using mvn:xxx url. Does that interface ( service ) expose somewhere? so that I can download a given maven artifact into karaf's local disk space, to be processed later? Thanks for all the help. -Dan -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/ Open Source SOA http://fusesource.com