Wednesday, November 28

mmm... durian

One of the benefits of living in Malaysia is the wide range of food available*. It took me a while to get used to eating durian fruit, as the smell reminded me too much of ripe cheese - but now my wife and I can happily eat several in a single sitting.

I don't know exactly when it happened, but one day I was drawn to the smell rather than it putting me off - since then I look forward to durian season and enjoy savouring the different flavours and textures you can find here and in Indonesia. Every fruit is different - and now and again you find a really great durian that you just wish you could eat again :)

These days you can find durian in ice-cream, candy, mooncakes - even doughnuts!



perhaps this could even make Homer Simpson try durian?

(* I also like Indonesian salak but it's hard to find good supplies of this locally)

Wednesday, November 21

Pax Construct 0.6.1 Released

http://repository.ops4j.org/maven2/org/ops4j/pax/construct/scripts/0.6.1/scripts-0.6.1.zip

if you have 0.6.0 installed, you can use pax-update to upgrade your existing scripts (must be run from inside the scripts bin directory).

Release Notes - Pax Construct - Version 0.6.1

Bug

  • PAXCONSTRUCT-47 - Default classpath entry for an imported bundle is missing when source is unavailable

Improvement

  • PAXCONSTRUCT-46 - Use latest release of Pax-Runner by default, instead of always defaulting to a known static version
  • PAXCONSTRUCT-49 - resources out of basic resource path included in details.bnd not copied when cloning, or fix for bundle build

New Feature

  • PAXCONSTRUCT-48 - Allow users to specify a different bundle groupId, rather than limiting them to the generated groupId

Friday, November 9

JayView Issue 14: OSGi - not just a four letter word

The latest issue of the Jayway magazine, JayView, is now out:

   JayView issue 14

it includes an article I wrote recently about OSGi - let me know what you think... (FYI, the cover shows the Petronas Towers, which are visible from the office where I work in Kuala Lumpur)

Wednesday, November 7

Peaberry: injecting OSGi services using Guice

Several months ago I blogged about Guice-OSGi, my OPS4J research project looking at using Guice to do dependency injection of OSGi services. Since then I've been distracted with other projects, moving house and our new cat (who almost managed to rewrite my DevCon submission when he took an keen interest in my MacBook, and then managed to disconnect the ADSL line - what a critic!)

Anyway, it seems that to officially use OSGi in a project name it must be an adjective, which is why Spring-OSGi has transformed into: "Spring Dynamic Modules for OSGi(tm) Service Platforms". Rather than try to compete with an equally long title, I decided to resurrect a name I'd previously used for a demo project: "peaberry", which is a special type of coffee bean. (as my wife will tell you, I really like coffee...)

So peaberry is the new Guice-OSGi, and is now hosted over at Google Code:

  http://code.google.com/p/peaberry

I decided to host the project there rather than at OPS4J because it makes it easier for people who know the Guice site to find their way to peaberry. BTW, if you're interested in helping out, let me know and I'll add you to the project team.

I've just made the first download available:

  peaberry-0.1.jar

which is an OSGi bundle of the latest trunk version of Guice with patches for issue 49 (binding factories) and issue 94 (classloader interception of generated classes) which are needed to use Guice in a reloadable container, such as OSGi. Hopefully these patches will eventually be folded back into the main Guice tree.

The next step is to install a 'bridge' classloader (based on issue 94) to allow generated classes to see both the internal Guice code and external user classes without needing DynamicImport-Package:* in the peaberry bundle. After that I plan to migrate the Guice-OSGi annotation work over to peaberry (based on issue 49) and remove the need to extend a specific base class to bootstrap the service injection process.

As mentioned in my last post, I've submitted a talk about my work on peaberry to the DevCon site, so if enough people are interested I may get the chance to explain all the cool features in person.

Tuesday, November 6

OSGi DevCon/EclipseCon 2008

Only a couple more weeks left to submit talks or tutorials for the next OSGi DevCon. I've submitted one tutorial and a talk so far:

An introduction to Pax tools for OSGi

OSGi service injection using Guice

Have you got an interesting story or project involving OSGi? If so then submit it soon - I don't want to be the only speaker :)

Friday, October 19

Migrate existing OSGi projects to the latest Pax-Construct

I'm currently tinkering with a Maven mojo to help people migrate old Pax-Construct (0.1.x) and other OSGi projects to the new Pax-Construct layout. At the moment this mojo only captures the project layout and types of bundles (wrapper, compiled, imported, etc.) but will eventually include the actual bundle source, BND instructions, and other POM customization - like extra repositories.

To try out the new mojo, either download the latest 0.2.1-SNAPSHOT scripts and use the pax-validate command to pull down the latest maven-pax-plugin, or build from the latest sources.

Then go to your OSGi project and call:

mvn org.ops4j:maven-pax-plugin:0.2.1-SNAPSHOT:clone

which should generate both UNIX and Windows build scripts under the target folder.

Make sure the 0.2.1-SNAPSHOT Pax-Construct scripts are on your path, and cd to a temporary directory - you should then be able to call the generated build script, which will recreate the project structure using the latest Pax-Construct commands.

For example:

cd ~/Code/ops4j/pax/radman ; mvn org.ops4j:maven-pax-plugin:0.2.1-SNAPSHOT:clone

cd /tmp ; ~/Code/ops4j/pax/radman/target/pax-clone-radman

If you want to make sure there's only one main project, use the -DunifyRoot Maven property to bring any disconnected (ie. parent-less) modules under the same root project.

Feel free to try it out and feedback any issues / requests via the OPS4J JIRA site as usual - enjoy!

Friday, October 12

Rapid OSGi development : Pax-Construct 2 goes GA

I've just made the new version of Pax-Construct generally available on the OPS4J repository:

http://repository.ops4j.org/maven2/org/ops4j/pax/construct/scripts/0.2.0-ga/scripts-0.2.0-ga.zip

detailed documentation for the scripts and Maven2 plugins can be found on the following site:

http://www.ops4j.org/projects/pax/construct/index.html

including an example of using Pax-Construct to assemble and deploy Spring Dynamic Modules!

http://www.ops4j.org/projects/pax/construct/examples/spring-osgi.html

Other noteworthy features:

  • much simpler project layout - you can even create standalone bundle POMs
  • transitive wrapping of third-party jars and their dependencies
  • transitive importing of OSGi bundles and their bundle dependencies
  • new scripts to help move bundles around the project
  • supports the latest release of Pax-Runner!
I'm away in Penang for the next few days, but will be back soon to answer questions and provide many more examples. In the meantime, feel free to comment on the wiki, or raise issues on JIRA :)

Launching Spring Dynamic Modules using Pax-Runner

My fellow OPS4J'r Alin Dreghiciu has produced a really cool screencast showing how you can quickly deploy Spring-OSGi M3 using his recently released version of Pax-Runner:

http://wiki.ops4j.org/confluence/x/SwBN

You can also read more about the ongoing Pax-Runner story at:

http://wiki.ops4j.org/confluence/x/A4A6

Support for the major OSGi frameworks, flexible configuration, directory and maven scanners - what more could you want? (if yes, please mention it on JIRA!)

Alin's screencast is now linked from the Spring Dynamic Modules site:

http://www.springframework.org/osgi

well done Alin!