Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.

Slides:



Advertisements
Similar presentations
When Applications can Roam Freely OSGi Service Platform R4 Peter Kriens Technical Director OSGi
Advertisements

©2003 aQute, All Rights Reserved Tokyo, August 2003 : 1 OSGi Service Platform Tokyo August 28, 2003 Peter Kriens CEO aQute, OSGi Fellow
Copyright © 2001 Qusay H. Mahmoud JavaBeans An introduction to component-based development in general Introduction to JavaBeans – Java components – client-side.
Component Oriented Programming 1 Chapter 2 Theory of Components.
Component Models and Technologies Case Study: OSGI.
Why OSGi matters for Enterprise Java Infrastructures
Apache Axis2 - OSGi Integration in WSO2 Carbon Platform
Component Models and Technology Component-based Software Engineering
Java Beans & Serialization CS-328 Dick Steflik. Java Beans Java based component technology –originally developed to provide java with a component technology.
Persistent State Service 1 CORBA Component  Component model  Container programming model  Component implementation framework  Component packaging and.
OSGi: Open Services Gateway Initiative Richard Chapman 5 Sept
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
1 Build a Web Application on J2EE. 2 J2EE Scenario Client – Web Server – EIS Resources Client – Web Server – EIS Resources Client – Application Server.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
By Dr. Jiang B. Liu 12. The Java Beans. Java Beans n JavaBeans is a portable, platform-independent software component model written in Java. It enables.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
JAVA BEANS By Madhuri Kakumanu. What is a Java Bean? “ A Java Bean is a reusable software component that can be visually manipulated in builder tools.”
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
Spring Dynamic Modules. Startlocation: Documentation: /1.2.1/reference/html/
Java Beans Component Technology Integrated, Visual Development Environments Reusable Platform-Independent Modular.
Component-Based Software Engineering Introduction to Java Beans Paul Krause and Sotiris Moschoyiannis.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
OSGi.
Understanding Code Compilation and Deployment Lesson 4.
Introduction to the Atlas Platform Mobile & Pervasive Computing Laboratory Department of Computer and Information Sciences and Engineering University of.
Chapter 10 Introduction to Components. Process Phases Discussed in This Chapter Requirements Analysis Design Implementation ArchitectureFramework Detailed.
1 J2EE Components. 2 Application Servers relieve the programming burden for business distributed components. They provide support for system level services.
Choon Oh Lee OSGi Service Platform. About OSGi Service Platform What it is, Where it is used, What features it provides are Today’s Content.
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Introduction to J2EE Architecture Portions by Kunal Mehta.
Last update October 18, 2004 Advanced Programming 2004 Java Beans.
Component-based software architecture Overview Divides the problem into sub-problems each associated with component partitions. The interfaces of the components.
JavaBeans Components. To understand JavaBeans…  Proficient experience with the Java language required  Knowledge of classes and interfaces  Object-Oriented.
TM Introduction to JavaBeans™ Dimitrios Psarros Questra Consulting (716) x225.
Component frameworks Roy Kensmil. Historical trens in software development. ABSTRACT INTERACTIONS COMPONENT BUS COMPONENT GLUE THIRD-PARTY BINDING.
Webservice versioning using osgi Allard Buijze, Jettro Coenradie.
Open Service Gateway Initiative (OSGi) Reporter : 林學灝 侯承育 1.
Andrew S. Budarevsky Adaptive Application Data Management Overview.
Java Programming: Advanced Topics 1 JavaBeans Chapter 8.
© 2002, Youngjoon Choi, RESL, Inha University Page : 1 Open Services Gateway initiative OSGi Open Services Gateway Initiative Youngjoon Choi © Realtime.
ICT Strategy Intelligent Highways: Endpoint Adapters.
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
Introduction to Java Beans CIS 421 Web-based Java Programming.
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Introduction to Software Components: the JavaBeans specs Babak Esfandiari.
EUFORIA FP7-INFRASTRUCTURES , Grant Migrating Desktop Uniform Access to the Grid Marcin Płóciennik Poznan Supercomputing and Networking Center.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Creating competitive advantage Copyright © 2003 Enterprise Java Beans Presenter: Wickramanayake HMKSK Version:0.1 Last Updated:
Introduction to OSGi +ActorFrame Surya Bahadur Kathayat
Intro to the Atlas Platform Raja Bose Dr. Abdelsalam (Sumi) Helal January 23, 2007.
Real-Time Systems Lab. OSGi overview January 23, 2002 Sung-ho Park.
ECLIPSE RICH CLIENT PLATFORM Part 1 Introduction.
Introduction to Advanced Java Programming
Overall Architecture and Component Model
Java Beans Sagun Dhakhwa.
Introduction to J2EE Architecture
Knowledge Byte In this section, you will learn about:
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
JavaServer Faces: The Fundamentals
Saranya Sriram Developer Evangelist | Microsoft
Tuesday Brown Bag Inversion of Control with Howard Abrams
Seminarium on Component-based Software Engineering
Java Programming: Advanced Topics
Presentation transcript:

Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02

Who I Am Humberto Cervantes 3d year PhD at Adèle team, LSR, Grenoble www-adele.imag.fr Collaborators: Jean-Marie Favre : PhD supervisor Jacky Estublier : Team director Richard S. Hall : Visitor Work area: Applying Component-Based Technologies to build Software Environments

Comparing OSGi and JavaBeans Two component technologies: JavaBeans: visual assembly of applications Open Services Gateway Initiative (OSGi): service deployment in home gateways. Richard S. Hall, implementor of OSCAR How do these two technologies support a set features that characterize component models? Since some aspects are complementary, how can they be integrated?

Points of Comparison Components : Have a clear and explicit boundary Well specified interface and explicit dependencies Can be customized Can be assembled Are reusable Are units of substitution Are units of delivery and deployment Have certified properties* Component Framework Runtime services to support the model

JAVABEANS

JavaBeans Sun’s technology oriented towards visual assembly of applications Introduced in 1996 Client-side Relatively simple compared to EJB

JavaBeans in a Builder Tool Bean Palette Assembly canvas Selected instance Selected instance properties Running application

What is a JavaBean ? JavaBean: Standard Java class that follows certain naming conventions Express properties, receptacles, events. JAR: Package file for JavaBeans Along with an optional class that provides information, the BeanInfo class Difference between design-time and run- time

Life-cycle Serialized beans become prototypes Instantiation occurs either inside builder tools or in ‘real’ applications. Compilation Packaging InstantiationCustomization SerializationStorage of assembly.class.ser.jar.xml.java Manifest.mf

Boundary and Dependencies Interface is well defined Dependencies With respect to the runtime and imported packages: not explicit Towards other beans, classes or resources: can be described if they occur in the same JAR file. EventSource addEvtListener EventSink implements EvtListener Properties getName/setName Interfaces Receptacle getName/setName

Customization Properties are persistent attributes Changing value of properties Build-time activity Calls to setter methods Can be done at the component or instance level

Assembly Assembly: graph of inter-connected instances. References are transient An assembly cannot directly become itself a Bean. Storage and retrieval of graphs is available. XML Encoder / Decoder

Reusability and Substitution JavaBeans promote reuse However, all the dependencies of the Bean must be known. A JavaBean can be substituted by another if it provides the exact same interfaces.

Delivery and Deployment JAR file is the unit of delivery and deployment for JavaBeans. A manifest file inside the JAR provides simple information about the JavaBeans it contains There is no component registry, Beans are loaded from the classpath Only one version can be available

OSGI

OSGi Open Services Gateway Initiative Founded in 1999 (more than 70 companies) Goal is to define a set of Java APIs that specify a services gateway architecture. OSGi specification: 1st rel: May 2000, 2d rel: October 2001 A service platform that includes: A minimal component-like model A lightweight framework to manage the components. Source:

Global View Source: java.sun.com Services Gateway Bundles Framework JVM Registry Services Services Gateway OSGi Framework : Service registry and request facilities Bundle management facilities

Services and Bundles Service: A Java interface Registered in the framework along with an object that implements it and a set of properties of type name,value Bundle: Delivery and deployment units (JAR file) Contains services: interfaces, implementations and resources Manifest file contains meta-data

Boundary and Dependencies Services have a clearly defined interface No dependencies at service level Bundle Bundle-to-package depencies Code inside the bundle imports packages exported by other bundles Managed by the framework Bundle-to-Service dependencies Code inside the bundle uses services Unmanaged but can be described Runtime dependencies Unmanaged but can be described

Customization Services that implement a particular interface can be customized. Through getter/setter methods Services are shared, a change in the state affects all of the clients.

Assembly No concept of assembly Applications are dynamically created by bundles that connect to services A service request includes the name of the service plus a filter (&(manufacturer=sun)(version>=1.0)) Might return several responses

Units of delivery and deployment The Bundle is the unit of delivery and deployment. JAR file State

Reusability and Substitution Bundles can be reused in different frameworks In a framework at any moment, however, only one bundle from a particular location can exist. Substitution can occur during runtime.

Comparison

JavaBean component vs. OSGi service JavaBean : can be instantiated OSGi service : shared by multiple clients Assemblies JavaBeans: graphs and hierarchies are supported OSGi: No concept of assembly.

Comparison Framework OSGi: Explicit framework to manage delivery units ServiceRegistry JavaBeans: Several classes provide runtime services ClassPath

Comparison Support for customization OSGi: Services are shared. Delivery units OSGi: well managed package dependencies JavaBeans: poor dependency management

Conclusion

Two complementary models Different concept of ‘component’ JavaBeansOSGi Beans +Services JAR fileBundle + Assembly unit Delivery unit

Integration of JavaBeans and OSGi OSGi used as an infrastructure for managing delivery units. A special factory service is registered to create instances of JavaBeans Factory pattern OSGi registry becomes a component registry Factories are located with LDAP filters

Current Work Beanome=JavaBeans+OSGi A prototype: www-adele.imag.fr/BEANOME

Services Gateway & Framework Gateway: embedded server that stands between ‘external’ internet and local network. Framework : Java infrastructure contained inside the gateway that provides: Service registry and request facilities. Bundle management facilites.

Bundle lifecycle INSTALLED RESOLVED STOPPINGSTARTING ACTIVE UNINSTALLED install uninstall update start stop Explicit Transition Automatic transition

JavaBeans Framework java.beans.Beans Instantiation Resource loading java.beans.Introspector Use beaninfo or standard reflection java.beans.beancontext.BeanContext Hierarchy of JavaBean instances Composite pattern Context can provide services Java.beans.Encoder/Decoder Storage/retrieval of a graph of JavaBeans

OSGi Framework A bundle can contain an optional Activator class Called when the bundle starts and stops Receives a BundleContext : Bundle Management Service registration Service request Reception of framework events