Spring Dynamic Modules

Similar documents
OSGi & Spring combined

Spring and OSGi. Martin Lippert akquinet agile GmbH Bernd Kolb Gerd Wütherich

OSGi on the Server. Martin Lippert (it-agile GmbH)

Patterns and Best Practices for Dynamic OSGi Applications

Modular Java Applications with Spring, dm Server and OSGi

Patterns and Best Practices for dynamic OSGi Applications

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Christopher Frost Virgo Committer Martin Lippert Lead, Spring Development Tools SpringSource, a division of VMware 3rd November 2011

7. Component Models. Distributed Systems Prof. Dr. Alexander Schill

Spring Framework 2.5: New and Notable. Ben Alex, Principal Software Engineer, SpringSource

Using Apache Felix: OSGi best practices. Marcel Offermans luminis

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies

Comparative Analysis of EJB3 and Spring Framework

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

OSGi In Action: Creating Modular Applications In Java By Richard Hall, Karl Pauls READ ONLINE

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Spring Framework 2.0 New Persistence Features. Thomas Risberg

Java EE 6 & GlassFish v3 Paving the path for future. Arun Gupta Sun Microsystems, Inc.

Enterprise Java Development using JPA, Hibernate and Spring. Srini Penchikala Detroit JUG Developer Day Conference November 14, 2009

1 Markus Eisele, Insurance - Strategic IT-Architecture

Specialized - Mastering Spring 4.2

Oracle 10g: Build J2EE Applications

Enterprise Development

Java Platform, Enterprise Edition 6 with Extensible GlassFish Application Server v3

Equinox Project Update

Breaking Apart the Monolith with Modularity and Microservices CON3127

Apache Felix. Richard S. Hall. A Standard Plugin Model for Apache. Atlanta, Georgia U.S.A. November 13th, 2007

Java EE 6: Develop Web Applications with JSF

2005, Cornell University

Liberate your components with OSGi services

First Steps in RCP. Jan Blankenhorn, WeigleWilczek GmbH, Stuttgart, Germany. February 19th, 2009

EJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java

OSGi in WebSphere : The Story so far

Course Content for Java J2EE

Architecting Java solutions for CICS

presentation DAD Distributed Applications Development Cristian Toma

Carsten Ziegeler

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Contents at a Glance

ISV Technical Executive Forum 2011

Migrating traditional Java EE applications to mobile

/ / JAVA TRAINING

IBM WebSphere Application Server 8. Java EE 6 Feature Packs

CORE JAVA 1. INTRODUCATION

Dan Hayes. October 27, 2005

. METHODOLOGY. MVC Based E-commerce Design. Literature Review based On Model View Controller MVC with J2EE. Public Cloud Implementation for E-commerce

Specialized - Mastering JEE 7 Web Application Development

Spring Web Services Tutorial With Example In

Spring Today and Tomorrow

ECLIPSE PERSISTENCE PLATFORM (ECLIPSELINK) FAQ

Using OSGi in Modular WebSphere Applications

Comparing JavaBeans and OSGi

Copyright Oracle Corporation and VMware Inc, Enterprise Modules Project (Gemini) Proposal

Building the Enterprise

Creating Manageable Systems With JMX, Spring, AOP, and Groovy

Beginning POJOs: Lightweight Java Web Development Using Plain Old Java Objects In Spring, Hibernate, And Tapestry (Novice To Professional) By Brian

IBM Rational Application Developer for WebSphere Software, Version 7.0

Development of E-Institute Management System Based on Integrated SSH Framework

Not just an App. Server

OSGi in Action. RICHARD S. HALL KARL PAULS STUART McCULLOCH DAVID SAVAGE CREATING MODULAR APPLICATIONS IN JAVA MANNING. Greenwich (74 w. long.

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Java Enterprise Edition

Dependencies, dependencies, dependencies

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

JavaEE Interview Prep

Java Training Center, Noida - Java Expert Program

Spring framework was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.

Sitesbay.com. A Perfect Place for All Tutorials Resources. Java Projects C C++ DS Interview Questions JavaScript

Outline. Project Goal. Overview of J2EE. J2EE Architecture. J2EE Container. San H. Aung 26 September, 2003

What s new in Spring Web Flow 2.0

Expeditor Client for Desktop. Web Container and Web Applications

Deccansoft Software Services. J2EE Syllabus

JBoss SOAP Web Services User Guide. Version: M5

Fast Track to Java EE 5 with Servlets, JSP & JDBC

OSGi. Building LinkedIn's Next Generation Architecture with OSGI

JAVA SYLLABUS FOR 6 MONTHS

Java J Course Outline

Building LinkedIn's Next Generation Architecture with OSGI

Université Joseph Fourier Grenoble 1 UFR IMAG Magistère 2 ème année Informatique

WebSphere Application Server Support for OSGi Applications

JAVA Training Overview (For Demo Classes Call Us )

Eclipse Java Ejb 3.0 Tutorial For Beginners With Examples Pdf

CONFIGURING A SPRING DEVELOPMENT ENVIRONMENT

Agenda. Why OSGi. What is OSGi. How OSGi Works. Apache projects related to OSGi Progress Software Corporation. All rights reserved.

Generating A Hibernate Mapping File And Java Classes From The Sql Schema

BEAWebLogic. Event Server. Creating WebLogic Event Server Applications

Spring 2.0 and Beyond

11-15 DECEMBER ANTWERP BELGIUM

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

The dialog boxes Import Database Schema, Import Hibernate Mappings and Import Entity EJBs are used to create annotated Java classes and persistence.

~ Ian Hunneybell: CBSD Revision Notes (07/06/2006) ~

Einsatz von Komponenten in JEE am Beispiel von IMIXS

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Struts: Struts 1.x. Introduction. Enterprise Application

Java Advance Frameworks

This course is intended for Java programmers who wish to write programs using many of the advanced Java features.

JBoss World 2009 Aaron Darcy

J2EE Development with Apache Geronimo. Aaron Mulder Chariot Solutions

Projects. How much new information can fit in your brain? Corporate Trainer s Profile TECHNOLOGIES

Transcription:

June 10-11, 2008 Berlin, Germany Spring Dynamic Modules by Example Martin Lippert Gerd Wütherich

Agenda Spring Overview of the Spring framework A short example Spring Dynamic Modules Overview of Spring DM A short example What s new in Spring DM 1.1 Web support A short example 2

Key Spring Concepts Simple Simple Object Obj t Object Portable Service Abstractions 3

The Heart of Spring Lightweight container Full stack, simple object based application development Works in any environment web-app, ejb, integration test, standalone Provides a powerful object factory that manages the instantiation, configuration, decoration and assembly of objects 4

Spring Framework Dependency injection Aspect Oriented Programming support Technology abstractions Integration with persistence technologies (JDBC, Hibernate) Web application support Spring MVC, JSF and Struts Enterprise service abstractions Transactions Messaging 5

Spring: An Example The Order Service can be used to place a stock order for a customer. is accessible via RMI. The Customer Service can be used to retrieve customer information. 6

Intermediate result Spring simplifies the development of enterprise applications De facto standard for JEE development 7

Spring Dynamic Modules for OSGi Service Platforms Formerly known as Spring-OSGi An open source project in the Spring portfolio led by SpringSource committers from BEA and Oracle http://www.springframework.org/osgi Allows to implement Spring Applications on top of an OSGi framework Works with Equinox, Felix, Knopflerfish 8

Project Objectives Bring the benefits of OSGi: modularity versioning lifecycle support To Spring-based enterprise application development 9

Challenges Complexity Bring the simplicity of POJOs to OSGi Integrate with OSGi service model Spring beans <==> OSGi services Testing Enable testing without OSGi container No dependencies on OSGi APIs Allow people to use all the Spring technology abstractions 10 10

Bundles und Spring Application context per bundle: Spring DM creates and destroys the application context when the bundle is started or stopped META-INF/spring/*.xml or Spring-Context header in MANIFEST.MFMF 11 11

Beans as OSGi Services Spring beans can be exported as OSGi Services (no dependencies on OSGi Service Registry API) <bean name="customerservice" class="com.wuetherich.osgi.customerservice.impl.customerserviceimpl"/> <osgi:service id="customerserviceosgi" ref="customerservice" interface="com.wuetherich.osgi.customerservice.customerservice"/> 12 12

OSGi Services as Beans OSGi Services can be imported and integrated as beans (again no dependencies on OSGi Service Registry API) <osgi:reference id="customerserviceosgi" interface="com com.wuetherich.osgi.customerservice.customerservice osgi customerservice CustomerService"/> <bean id="orderservice" class="com.wuetherich.osgi.orderservice.internal.orderserviceimpl"> <property name="customerservice"> <ref local="customerserviceosgi"/> </property> </bean> 13 13

The Spring OSGi Modell 14 14

Spring DM by Example 15 15

Further Possibilities Cardinality Relationship between imported OSGi Services and the representing bean (1..1, 0..1, 1..n, 0..n) Service Listener Informs about service changes <osgi:property-placeholder> Refer to properties from the ConfigAdmin service <osgi:bundle> Refers to the OSGi bundle object <osgi:virtual-bundle> Install a virtual OSGi bundle on the fly (testing) 16 16

Results No OSGi API programming necessary Spring POJO programming model Visibilities of spring beans controllable via service exports and imports Dependency injection across bundles Dynamic service handling made easier 17 17

Spring-DM Web Support Focus of Spring DM 1.1 Currently under development Integration of existing spring web support with Spring DM Web applications with OSGi Different deployment scenarios possible 18

OSGi-based web apps part 1 Scenario 1: OSGi embedded into web app 19

OSGi-based web apps part 2 Scenario 2: Web container embedded into OSGi 20

The Spring DM way 21

Web applications as Bundles Regular WAR files Additional Bundle-Manifest web.xml shows how Spring DM is integrated <context-param> <param-name>contextclass</param-name> <param-value>org.springframework.osgi.web.context. support.osgibundlexmlwebapplicationcontext</param-value> </context-param> t <listener> <listener-class> org.springframework.web.context.contextloaderlistener </listener-class> </listener> 22

Spring DM Web Support by Example 23

Even more Spring All the Spring features for clients as well Eclipse-RCP, for example Integration with Equinox Extension Registry model possible Dependency injection for extension objects, for example http://www.martinlippert.org/ 24 24

Outlook More information: http://www.springframework.org/osgi http://groups.google.com/group/spring-osgi http://www.springframework.org/osgi/specification Spring Dynamic Modules tutorial: http://www.eclipsecon.org/2008/?page=sub/&id=495 25 25

Die OSGi Service Platform Eine Einführung mit Eclipse Equinox Detailed introduction into OSGi April 2008, dpunkt.verlag ISBN 978-3-89864-457-0 Already available!!! (but German only at the moment ) 26

Thank you!!! for your attention!!! Q&A martin.lippert@akquinet.de gerd@gerd-wuetherich.de 27 27