Aspect Weaving for OSGi. Martin Lippert (akquinet it-agile GmbH)



Similar documents
Operations and Monitoring with Spring

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0

Glassbox: Open Source and Automated Application Troubleshooting. Ron Bodkin Glassbox Project Leader

Architecture Rules Enforcement and Governance Using Aspects

Developing modular Java applications

Equinox Framework: A Happier OSGi R6 Implementation

Building a Modular Server Platform with OSGi. Dileepa Jayakody Software Engineer SSWSO2 Inc.

Converting Java EE Applications into OSGi Applications

InfoSphere Master Data Management operational server v11.x OSGi best practices and troubleshooting guide

Crystal Reports for Eclipse

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

Eclipse 4 RCP application Development COURSE OUTLINE

A COMPARISON OF AOP BASED MONITORING TOOLS

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

What means extensibility?

Apache Karaf in real life ApacheCon NA 2014

Providing Load Balancing and Fault Tolerance in the OSGi Service Platform

BIRT Application and BIRT Report Deployment Functional Specification

Developing Service-Oriented Architecture Applications with OSGi

Aspect-Oriented Programming

Designing an Enterprise Application Framework for Service-Oriented Architecture 1

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

Java Building Web Apps with Spring Rob Harrop, Interface21 Ltd.

Efficient Monitoring of OSGi Applications

Using AOP Techniques as an Alternative Test Strategy

Enterprise Application Management with Spring

e(fx)clipse - JavaFX Tooling and Runtime

Enterprise Application Development In Java with AJAX and ORM

Escaping the Works-On-My-Machine badge Continuous Integration with PDE Build and Git

Best Practices for Programming Eclipse and OSGi

Creating an application with the Virgo Web Server

Outline SOA. Properties of SOA. Service 2/19/2016. Definitions. Comparison of component technologies. Definitions Component technologies

Developing Eclipse Plug-ins* Learning Objectives. Any Eclipse product is composed of plug-ins

BPM Scheduling with Job Scheduler

Software Project Management and UML

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Generating Aspect Code from UML Models

Encapsulating Crosscutting Concerns in System Software

Application Framework: Apertis Hands-on

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

Web4thejob. About Web4thejob. ZK x Web4thejob

Chapter 5 Aspect Oriented Programming

Kohsuke Kawaguchi Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID

Take full advantage of IBM s IDEs for end- to- end mobile development

M 2 M IWG. Eclipse, M2M and the Internet of Things. Overview. M 2 M Industry WorkGroup! M2M?

XPoints: Extension Interfaces for Multilayered Applications

Aspects for Testing Aspects?

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

Aspect-Oriented Web Development in PHP

Basic Android Setup Windows Version

CLOUD COMPUTING & WINDOWS AZURE

JVA-561. Developing SOAP Web Services in Java

IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

How To Develop An Open Play Context Framework For Android (For Android)

Done. Imagine it. c Consulting. c Systems Integration. c Outsourcing. c Infrastructure. c Server Technology.

Build management & Continuous integration. with Maven & Hudson

Enterprise AOP with Spring Applications IN ACTION SAMPLE CHAPTER. Ramnivas Laddad FOREWORD BY ROD JOHNSON MANNING

Extend WTP Server Tools for your application server. Tim deboer Gorkem Ercan

IBM Proof of Technology Discovering business application services, featuring IBM WebSphere Application Server Network Deployment V8

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

e(fx)clipse - JavaFX Tooling and Runtime

IBM Tivoli Workload Scheduler Integration Workbench V8.6.: How to customize your automation environment by creating a custom Job Type plug-in

Rapid Application Development. and Application Generation Tools. Walter Knesel

Load balancing using Remote Method Invocation (JAVA RMI)

Software Engineering and Technology Trends

Installation Guide of the Change Management API Reference Implementation

BladeLogic, Inc. Technical Disclosure Publication Document. Neeran Karnik, Amol Vaikar. Image-based Server Provisioning using Superset Stacks

CS 209 Programming in Java #1

Effective Java Programming. efficient software development

Eliminating SQL Injection and Cross-Site Scripting With Aspect Oriented Programming

ECE 455/555 Embedded System Design. Android Programming. Wei Gao. Fall

E4 development: examples, methods and tools. Eclipse Con France 2014

Eclipse. Software Engineering with an Integrated Development Environment (IDE) Markus Scheidgen

Building native mobile apps for Digital Factory

Web Development with the Eclipse Platform

ReSTful OSGi Web Applications Tutorial. Khawaja Shams & Jeff Norris

ON-PREMISE OR IN THE CLOUD, A SINGLE JAVA EE APPLICATION PLATFORM

Securing your business

Introduction to Amazon EC2 Running IBM

SPRING INTERVIEW QUESTIONS

Eclipse Rich Client Platform. Kai Tödter Karsten Becker et al. Organized by:

Transcription:

Aspect Weaving for OSGi Martin Lippert (akquinet it-agile GmbH) 2008 by Martin Lippert; made available under Creative Commons Att. Nc Nd 2.5 license October 21 st + 23 rd, 2008

Aspect-oriented programming Modularity improved a lot by OO concepts Classes, interfaces Information hiding, polymorphism, inheritance AOP adds additional concepts To modularize so called cross-cutting concerns ClassA ClassB ClassC AspectX

AOP today Meanwhile AOP is an established concept Useful for many situations Mostly technology-centric usage scenarios Established languages and frameworks available AspectJ: powerful language extension to Java Spring-AOP: simple to use AOP for enterprise apps Used in production: Spring itself makes heavy use of AOP concepts App-servers are using AOP inside Direct AOP selectively used in enterprise apps

AspectJ = AOP for Java AspectJ is a powerful language extension for Java Hosted as an Eclipse project Still very active (latest release 1.6.1 in July 2008) AJDT: Great tooling for the Eclipse IDE (3.3, 3.4) Comes close to the JDT feeling Spring-IDE: Integrates AJDT with Spring-AOP AJDT feeling for Spring apps

The Standard Use Case ClassA ClassB ClassC AspectX Project Sources Single Application Classpath Java Virtual Machine

Library Aspects ClassA ClassB ClassC AspectX Project Sources JAR Single Application Classpath Java Virtual Machine

Aspects for Existing Code ClassA ClassB ClassC AspectX JARs Project Sources Single Application Classpath Java Virtual Machine

Java + OSGi OSGi: A dynamic module system for Java Modularity Dynamic Service-Oriented

What does it mean for us? We would like to modularize classes and interfaces into bundles and aspects into bundles The obvious next step: modularize cross-cutting cutting concerns into bundles Takes modularity to the next level

Intra-Bundle Aspects ClassA ClassB ClassC AspectX Bundle A Bundle-Classpath Bundle B Bundle-Classpath Java Virtual Machine

Co-Op Bundle Aspects ClassA ClassB ClassC AspectX Bundle A Bundle B Bundle C Bundle-Classpath Bundle-Classpath Bundle-Classpath Java Virtual Machine

Abstract Aspect Bundles ClassA ClassB Concrete Abstract t Aspect Aspect Bundle A Bundle B Bundle-Classpath Bundle-Classpath Java Virtual Machine

Dynamics for Aspect Bundles OSGi allows dynamic bundle installs uninstalls updates Same should be possible for aspect bundles dynamic installs, uninstalls and updates of aspect bundles dynamic installs, uninstalls and updates of bundles that are affected by aspects

How could all this possibly work?

Equinox Aspects Equinox Incubator Project http://www.eclipse.org/equinox/incubator/aspects Enables AspectJ/AOP for OSGi Supports all presented use-cases Ready-to-use Setting Works with Eclipse 3.4 (and 3.3 deprecated) Works with AJDT 1.5.2, 1.5.3, 1.6.0, 1.6.1

What can I do? Put aspects into standard OSGi bundles Just like Java classes Define what and where to weave Go! aop.xml and manifest headers Feels like a natural combination of AOP and OSGi

Load-Time Weaving for OSGi Let the OSGi runtime take care of weaving the aspects (and not the compiler) Leads to load-time weaving within OSGi This means: No recompilation of existing bundles necessary Supports aop.xml load-time weaving config of AspectJ

Live Demo Monitoring Eclipse bundles

Caching Wasn t that a fast startup? The reason: caching for woven classes Load-time weaving happens only once Second time startup is same as without aspects Available for standard d JREs and IBM J9 shared classes Supports configuration switching

Dynamics Dynamics for aspect bundles Means re- or un-weaving existing bundles How is it realized? Silent update of bundles to be woven again Bundles must behave nicely within dynamic situations

Live Demo Installing, updating, uninstalling aspects at runtime

AOP in Spring Spring uses AOP a lot for all kinds of purposes @Configurable is one example Realized by Spring via load-time aspect weaving

Spring Dynamic Modules & Equinox Aspects Equinox Aspects can do load-time aspect weaving for Spring Dynamic Modules Live Demo @Configurable for Extensions (Views in Eclipse RCP apps)

Equinox Aspects in Production Systems Allianz Business System (ABS) Mission critical system at the core of the insurance business. Addresses all major concerns in the various classes of insurance. Online, offline and integration scenarios. Uses Equinox Aspects for highly specific performance monitoring (QoS) in production

APIs and Implementation org.eclipse.equinox.weaving.hook equinox Hooks into the runtime Provides API for injecting weaving and caching implementations org.eclipse.equinox.weaving.aspectj Implements aspect weaving using AspectJ org.eclipse.equinox.weaving.caching Implements caching for standard VMs org.eclipse.equinox.weaving.caching.j9 Implements caching for IBM J9 VMs (shared classes feature)

Conclusions Equinox Aspects brings full AOP to OSGi Load-time weaving integrated into OSGi Combines OSGi and AOP modularity features Can be used for production systems today Give it a try http://www.eclipse.org/equinox/incubator/aspects

Thank you for your attention! Q&A Martin Lippert: lippert@acm.org