OSGi , Spring OSGi and the server-side. Part 3

Here is a part from comparison between Spring OSGi and OSGi services, Equinox extensions.

Comparison Matrix


ExtensionsServicesDeclarative ServicesSpring-OSGi
What are registered?XML declarations, optionally containing class names.Java objects.Placeholder proxies for Java objects, replaced by real Java objects on first use.Placeholder proxies for Java objects, replaced by real Java objects on first use.
How are they registered?All <extension> nodes in the plugin.xmlare automatically registered.Through the BundleContext APIAll service component XML files declared through the Service-Component manifest entry are automatically registered.All Spring XML files contained in the META-INF/springfolder of a bundle, or declared through the Spring-Context
How are they consumed?Queried by extension point ID. Registry returns all entries, consumer must iterate them to find which one(s) it wants.Queried by interface name, plus a property filter. Usually the filter is specific enough to ensure just one match.Internally uses same query over interface name plus filter, but the
query is performed within SCR. Matching services are supplied to consumer code via JavaBean-style setter methods.
Same as for DS, but can additionally supply matching services via constructor arguments.
What is the cardinality?Conventionally, one to many. One extension point has many extensions, but each extension has exacly one extension point. However another plug-in can query extension points that it doesn’t own.Many to many. One service can be used by multiple consumers, and one consumer can use many services.Same as for servicesSame as for services
When are they loaded?Extension declarations are loaded during start-up, or when a new plug-in is installed. Classes named in the extension are loaded lazily, i.e.only when needed.The class that implements a service must be loaded and instantiated before the service can be registered. This happens only when the bundle is explicitly started.For delayed services, the SCR registers a placeholder proxy service immediately when a DS-enabled bundle is resolved. The real class is loaded and instantiated when the service is first used.Same as for DS.
How is dynamic installation/uninstallation dealt with?Either query on each use or track with ExtensionTracker.Either query on each use or track with ServiceTracker.SCR calls methods on the component to supply it with the latest available matching service. It can also call an unset method when the service becomes unavailable.Similarly to DS, supplies latest matching service through setter method on the bean.
Can caching references to extensions/services cause problems?Yes, and as a legacy of pre-OSGi usage, some plug-ins still do this.Yes, but this is strongly discouraged by the specification, and in practice happens rarely.No, SCR does not do this.No, Spring-OSGi does not do this.

Comparison by EclipseZone

Posted byEugene at 09:57 2 comments

OSGi , Spring OSGi and the server-side. Part 2

Spring OSGi is a sub project of Spring Framework.

"The Spring Framework is the leading full-stack Java/JEE application framework. It provides a lightweight container and a non-invasive programming model enabled by the use of dependency injection, aop, and portable service abstractions. OSGi offers a dynamic application execution environment in which components (bundles) can be installed, updated, or removed on the fly. It also has excellent support for modularity and versioning."


Benifits from using Spring OSGi in OSGi runtime environment:


  • Better separation of application logic into modules

  • The ability to deploy multiple versions of a module concurrently

  • The ability to dynamically discover and use services provided by other modules in the system

  • The ability to dynamically deploy, update and undeploy modules in a running system

  • Use of the Spring Framework to instantiate, configure, assemble, and decorate components within and across modules.

  • A simple and familiar programming model for enterprise developers to exploit the features of the OSGi platform.


If you want to know more about Spring OSGi and Spring Framework, you can start from reading introduction on Spring Framework site.

Posted byEugene at 09:57 0 comments

OSGi , Spring OSGi and the server-side. Part 1

I want to post here some information that will help you to find out more about OSGi and how Spring Framework work with it.



First I want to say few words about OSGi technology.


From Wikipedia, the free encyclopedia:
"The OSGi Alliance (formerly known as the Open Services Gateway initiative - now an obsolete name) is an open standards organization founded in March 1999. The Alliance and its members have specified a Java-based service platform that can be remotely managed. The core part of the specifications is a framework that defines an application life cycle model and a service registry. Based on this framework, a large number of OSGi Layers, APIs, and Services have been defined: Security, Module, Life Cycle, and Service Layers; Framework API; Package Admin Service; Start Level Service; Conditional Permission Admin; Permission Admin Service; URL Handlers Service; Log Service; HTTP Service (runs servlets); Device Access; Configuration Admin Service; Metatype Service; Preferences Service; User Admin Service; Wire Admin Service; I/O Connector Service; Initial Provisioning; UPnP Device Service; Declarative Services; Event Admin Service; Deployment Admin; Auto Configuration; Application Admin Service; DMT Admin Service; Monitor Admin Service; Foreign Application Service; Service Tracker; XML Parser Service; Position; Measurement and State; and Execution Environments.



"The OSGi specification is developed by the members in an open process and made available to the public free of charge under the OSGi Specification License. The OSGi Alliance has a compliance program that is open to members only. As of January 2007, the list of certified OSGi implementations contains 3 entries."



OSGi in fact:

"OSGi technology is the dynamic module system for Java™. The OSGi Service Platform provides functionality to Java that makes Java the premier environment for software integration and thus for development. Java provides the portability that is required to support products on many different platforms. The OSGi technology provides the standardized primitives that allow applications to be constructed from small, reusable and collaborative components. These components can be composed into an application and deployed.

The OSGi Service Platform provides the functions to change the composition dynamically on the device of a variety of networks, without requiring restarts. To minimize the coupling, as well as make these couplings managed, the OSGi technology provides a service-oriented architecture that enables these components to dynamically discover each other for collaboration. The OSGi Alliance has developed many standard component interfaces for common functions like HTTP servers, configuration, logging, security, user administration, XML and many more. Plug-compatible implementations of these components can be obtained from different vendors with different optimizations and costs. However, service interfaces can also be developed on a proprietary basis.

OSGi technology adopters benefit from improved time-to-market and reduced development costs because OSGi technology provides for the integration of pre-built and pre-tested component subsystems. The technology also reduces maintenance costs and enables unique new aftermarket opportunities because components can be dynamically delivered to devices in the field. "



To be continued...

Posted byEugene at 04:42 0 comments

Bundling Ajax into JSF components

"Any Java developer who has already worked with Java Server Faces has undoubtedly come across the need for a custom component. Most components in JSF implementations are rudimentary and don't really address real-world situations--if data-entry solutions for all problem domains were as simple as a login form, then JSF would be just the right tool out of the box. The saving grace of the framework is the ability to create and extend custom components, and if you couple that with the power and versatility of Ajax, you really start to reap the benefits of the modern Model-View-Controller architecture." - by Chris Hardin.

To get more information on how to bundle Ajax into custom JSF components, you can start from reading this article.

I want to say , that nowadays - you almost can't do JSF application without Ajax if you want to create powerful rich application.
Users of your application are hope and waiting that web application will be as close as possible to desktop applications. With all their's intuitive and responsible user interface, with flexible look&feel - with ability change it "on the fly".

Posted byEugene at 04:26 0 comments

QuipuKit JSF Library

The QuipuKit component suite includes advanced UI widgets (TreeTable, Chart, Calendar) and provides enhanced implementations of the standard JSF components (DataTable, TwoListSelection). Each QuipuKit component offers a rich feature listand various customization options, enabling you to create a desired look-and-feel with ease.


QuipuKit DataTableQuipuKit TreeTable

I'm currently using this library in one of my project. All my thoughts and impressions I will write later.

Posted byEugene at 02:16 0 comments

Combine JSF Facelets and the Flying Saucer XHTML Renderer

This is a very nice tool for JSF and Facelets.

"Facelets and the Flying Saucer Renderer have a symbiotic relationship: one produces XHTML content while the other "parses" it and lays it out into an object graph in memory. While this object graph is then usually translated into Graphics2D API calls to render the document in Swing/AWT, it can also be transformed into various other formats such as PDF, a selection of image formats, or as a Scalable Vector Graphics (SVG) document." - by by Jacobus Steenkamp

Now it is very easy to create reports in pdf documents using just simple .xhtml pages with all it's supported content.

Posted byEugene at 01:44 1 comments

Ajax - Real benefits of real components. Part 4

Continue from part 3.

Short list of useful AJAX components (from 32 to 39) :

32. Grid3 Example


AJAX Scripts - Grid3 Example


33. AJAX Table Sort Script (revisited)



AJAX Scripts - frequency decoder | Unobtrusive Table Sort Script (revisited)


34. AJAX Sortable Tables: from Scratch with MochiKit


AJAX Scripts - Sortable Tables from Scratch with MochiKit


35. AJAX TableKit


AJAX Scripts - TableKit


36. AJAX LightBox, Sexy Box, Thick Box


AJAX Scripts - NoFunc · Sexy Box · Javascript


37. AJAX Lightbox JS


AJAX Scripts - Lightbox JS


38. AJAX Unobtrusive Popup - GreyBox


AJAX Scripts - Orangoo Labs - GreyBox


39. SmoothGallery: Mootools Mojo for Images | Full gallery


AJAX Scripts - JonDesign's (Javascript) SmoothGallery: Mootools Mojo for Images | Full gallery



Full article by

Smashing Magazine

Posted byEugene at 05:38 0 comments

Ajax - Real benefits of real components. Part 3

Continue from part 2.

Short list of useful AJAX components (from 21 to 31) :

21. Chained select boxes


AJAX Scripts - Chained select boxes


22. AJAX Key Events Signal


AJAX Scripts - Signal Example


23. Disable form submit on enter keypress


AJAX Scripts - AS Workshop » Disable form submit on enter keypress


24. AJAX Instant Completion: Rico Framework


AJAX Scripts - Rico


25. Novemberborn: Event Cache


AJAX Scripts - Novemberborn: Event Cache


26. AJAX Emprise Charts: 100% Pure JavaScript Charts


AJAX Scripts - Emprise JavaScript Charts :: 100% Pure JavaScript Charts


27. amCharts: customizable flash Pie & Donut chart


AJAX Scripts - amCharts: customizable flash Pie & Donut chart


28. PJ Hyett : The Lightbox Effect without Lightbox



AJAX Scripts - PJ Hyett : The Lightbox Effect without Lightbox


29. AJAX Upload Form


AJAX Scripts - digitarald.de » Playground - Widget Birthplace


30. AJAX contact form


AJAX Scripts - AJAX contact form


31. Ajax.Form: mootools demo



AJAX Scripts - mootools demos - Ajax.Form




Full article by

Smashing Magazine

Posted byEugene at 05:37 0 comments

Ajax - Real benefits of real components. Part 2

Continue from part 1.

Short list of useful AJAX components (from 11 to 20) :

11. AJAX Calendars


AJAX Scripts - RibosoMatic » 10 calendarios con PHP, CSS y Javascript


12. AJAX Floating Windows


AJAX Scripts - Prototype Window Class : Introduction



13. AJAX Star Rating Bar


AJAX Scripts - Masuga Design » Unobtrusive AJAX Star Rating Bar


14. Ajax poller


AJAX Scripts - Ajax poller


15. AJAX HistoryManager, Pagination


AJAX Scripts - digitarald » HistoryManager


16. AJAX Tooltips: Nice Titles revised | Blog | 1976design.com


AJAX Scripts - Nice Titles revised | Blog | 1976design.com


17. AJAX Web Controls



AJAX Scripts - Pageproperties test page


18. AJAX syntaxhighlighter


AJAX Scripts - syntaxhighlighter - Google Code


19. GMail Ajax Style Username Signup


AJAX Scripts - Cyber Dummy - Web Developer


20. Transparent Message


AJAX Scripts - Transparent Message




Full article by

Smashing Magazine

Posted byEugene at 05:35 0 comments

Ajax - Real benefits of real components

Almost every person who work in web-development knows about all benefits that we've got with Ajax. All new web applications have to be more and more interactive, responsive and flexible. Here I wanted to present for you most interesting Ajax components that already done and can make development easy and your applications more powerful.

Short list of useful AJAX components (first 10) :

1. AJAX AutoSuggest: An AJAX auto-complete text field


AJAX Scripts - AutoSuggest: An AJAX auto-complete text field : CSS . XHTML . Javascript . DOM, Development : Brand Spanking New


2. AJAX Autocompleter / script.aculo.us library


AJAX Scripts - script.aculo.us - web 2.0 javascript demos


3. AJAX AutoCompleter


AJAX Scripts - digitarald.de » Playground - Widget Birthplace


4. Ajax autosuggest/autocomplete from database


AJAX Scripts - Ajax autosuggest/autocomplete from database


5. Ajax dynamic list


AJAX Scripts - Ajax dynamic list


6. AJAX inline text edit 2.0


AJAX Scripts - YvoSchaap.com - Easy AJAX inline text edit 2.0


7. AJAX Instant Edit


AJAX Scripts - xmlHttpRequest - Instant Edit


8. AJAX Menu Widget


AJAX Scripts - Comunidade brasileira da biblioteca EXTJS


9. AJAX Dialogs, Menus, Grids, Trees and Views


AJAX Scripts - Comunidade brasileira da biblioteca EXTJS


10. Ajax Tabs Content


AJAX Scripts - Dynamic Drive DHTML Scripts- Ajax Tabs Content script



Full article by

Smashing Magazine

Posted byEugene at 10:38 0 comments

What this blog about?

This blog is about Java, web development, all Java related server-side technologies,
about UI and how to design it, and also about JSF , AJAX, custom JSF components etc.

Posted byEugene at 10:38 0 comments