Thursday, March 16, 2017

New OSGi R7 spec drafts published

In the OSGi Enterprise and Core Platform Expert Groups we are working hard on the upcoming R7 specifications, which are planned to be released later this year. Recently the OSGi Alliance published the current drafts of some these specs.

In this blog post you can read a very brief summary of what is new, for all the further details look in the drafts.
In the Enterprise draft specification - new and changed are:

  • Remote services (ch 100) - has been enhanced to include new standard intents that require minimum remote service capabilities, asynchronous processing or a private remote connection.
  • Declarative Services (ch 112) - this spec has received a substantial update, including delayed object reclamation, component property type enhancements and other updates.
  • JPA Service (ch 127) - has been updated to support JPA 2.1, supports standard JPA 2.1 configuration properties with the EntityManagerFactoryBuilder and now specifies a number of standard Capabilities to integrate better with the Resolver.
  • new Transaction Control Service (ch 147) - this new specification provides an improved mechanism to perform work in a transaction scope. It provides a higher level of abstraction than the existing JTA integration specification, and makes it really easy to write transactional code, especially when using Java 8 lambdas.
  • new Configurator Specification (ch 150) - the configurator makes it possible to store configuration data for Configuration Admin driven entities in a bundle. The configuration is stored in a spec-defined format inside the bundle and can be used to configure any number of bundles, components, services or other entities via the Configuration Admin Service.
  • Promises specification (ch 705) - this spec is now updated with a number of improvements including timeouts, easier exception handling and callbacks.
  • new Push Streams (ch 706) -  This new spec provides a programming model similar to Java 8 pull-based streams, but then using a push model. This can be very useful for data such as events that arrives asynchronously. The data can be mapped, buffered, splitted, filtered or otherwise processed before it gets pushed to the receiver. 
  • new Converter (ch 707) - This spec defines a portable converter that can convert nearly everything to nearly anything. Especially useful then converting untyped data such as a Map to a typed API such as an interface, DTO or annotation. Converters can also be customized to support user-defined types or to create deviations from standard behavior.
The Core Specification has also been updated. Besides a number of small changes and improvements - see the Changes sections in each chapter for details - the Core spec now defines new Annotations in the org.osgi.annotation.bundle package that can be used to define bundle headers from inside the Java code of your bundle. For example, these can be used to declare requirements and capabilities that your bundle could have or to declare which packages should be exported.

The R7 March 2017 drafts for the Core and Enterprise specs can now be downloaded from here: https://www.osgi.org/developer/specifications/drafts

Finally, not yet in the draft, but coming up as well are:

  • Cluster Information Specification (previously known as Cloud Ecosystems), from RFC 183.
  • CDI integration, you can read more about this in RFC 193.
  • JAXRS integration, see RFC 217.
  • HTTP Whiteboard Extensions, RFC 223.
  • Resolver Service updates: RFC 224.
  • Configuration Admin updates, RFC 227.

1 comment: