pax – tools für den osgi alltag
DESCRIPTION
OSGi ist im Java Enterprise Bereich angekommen. In immer mehr Projekten möchte man OSGi mit komfortablen Tools "schmerzlos" einführen. PAX Construct und PAX Runner vereinfachen die Entwicklung von OSGi Bundles mit Hilfe von einigen Kommandozeilen-Scripts und Maven. PAX Exam ist ein Ansatz Integrations-Tests in einer laufenden OSGi Plattform durchzuführen und auszuwerten.Dieser Vortrag bietet Einblick wie man mit PAX Bundles erstellt, ausführt und auch testet. Was PAX ausserdem zu bieten hat lernen sie in einem Überblick über die weiteren Projekte.TRANSCRIPT
![Page 1: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/1.jpg)
PAX – Tools für den OSGi AlltagPatrick Baumgartner – Senior Software Consultant
![Page 2: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/2.jpg)
Agenda
Pax Ecosystem Pax Construct Pax Runner Pax Exam Pax Web
2
![Page 3: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/3.jpg)
About me
Patrick Baumgartner Senior Software Consultant at Swiftmind
Web development with Spring Framework OSGi with Spring DM & Spring Framework Agile Software Development
Co-Author of “OSGi für Praktiker”
3
![Page 4: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/4.jpg)
Pax Ecosystems
Umbrella project for OSGi at OPS4J Framework and platform independent Tools and service implementations
4
![Page 5: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/5.jpg)
5
Pax Ecosystem
![Page 6: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/6.jpg)
Pax Construct
Commandline Tool like Roo, Rails, Grails ...
Maven 2 based Archetypes & shell scripts Create and manage projects
6
![Page 7: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/7.jpg)
Pax Construct
pax-create-project pax-add-repository pax-create-bundle pax-import-bundle pax-embed-jar pax-wrap-jar pax-provision pax-create-module pax-move-bundle pax-remove-bundle pax-update pax-clone
7
![Page 8: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/8.jpg)
Pax Construct – Quick start
Download from Maven repo Unzip archive Add bin folder to system path
-> You are ready to build the first OSGi project
8
![Page 9: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/9.jpg)
Demo
9
![Page 10: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/10.jpg)
Pax Runner
Starts all major OSGi platforms
Provisions required artifacts Generates configuration Runs target platform in a
new JVM
Runing as a deamon
10
![Page 11: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/11.jpg)
Pax Runner – Quick start
Download pax runner Unzip archive Add bin folder to system
path
-> Now let's run different OSGi platforms
11
![Page 12: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/12.jpg)
Demo
12
![Page 13: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/13.jpg)
Pax Exam
Integration test framework Real integration tests JUnit and Pax runner based Configuration– fluent API– pom.xml
13
![Page 14: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/14.jpg)
Pax Web
OSGi R4 Http Service Web Container (RFC66) Based on Jetty 6 JSP Support WAR Extender
14
![Page 15: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/15.jpg)
Pax Web – Web Bundles
Manifest headers
– Bundle-ManifestVersion:2
– Bundle-SymbolicName
– Bundle-Version (optional)
– Bundle-Name (optional)
– Webapp-Context
– Bundle-ClassPath
– Import-Package
– Require-Bundle
15
![Page 16: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/16.jpg)
Pax Web with Pax Constuct
Change packaging to war Override maven-bundle-
plugin Add maven-war-plugin
Use web profile or get dependencies from Maven repository
16
![Page 17: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/17.jpg)
Pax Web
OSGi R4 Http Service Web Container (RFC66) Based on Jetty 6 JSP Support WAR Extender
17
![Page 18: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/18.jpg)
18
Questions ?
![Page 20: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/20.jpg)
Pictures
Agenda - http://www.sxc.hu/photo/1142603 OSGi für Praktiker – http://www.hanser.de/buch.asp?isbn=3-446-42094-0 Pax Ecosystem - http://www.abcya.com/word_clouds.htm Pax Construct - http://wiki.ops4j.org/display/paxconstruct/Pax+Construct Pax Web - http://wiki.ops4j.org/display/paxweb/Pax+Web Pax Exam - http://wiki.ops4j.org/display/paxexam/Pax+Exam Questions - http://www.flickr.com/photos/orsorama/138560428 Resources - http://www.sxc.hu/photo/1184809
20
![Page 21: Pax – Tools für den OSGi Alltag](https://reader036.vdocuments.site/reader036/viewer/2022062319/558603d2d8b42a81638b46e6/html5/thumbnails/21.jpg)
Resources
http://wiki.ops4j.org/display/ops4j/Pax http://pragprog.com/titles/cwosg/modular-java http://www.osgi-buch.com
21