Layout Image
  • Home
  • RCP Training
  • OSGi Training
  • Contact

Archive for Uncategorized – Page 3

Configuring RCP applications with Pax ConfMan

by Patrick
July 10th, 2009

Most applications require configuration settings. Applications are often deployed in multiple environments (dev, test, prod, etc) and these environments often require different runtime configurations. Also, it’s useful to be able to update an application configuration without a restart. If you find yourself with requirements like these for your Eclipse RCP application, you should really check out the OSGi Configuration Admin service.

Specifically, the Configuration Admin service allows you to:

  • Configure the OSGi services that you provide as part of your application.
  • Configure OSGi services that others provide. An example of this is the ability to configure the Pax Logging service, which I’ll explore in a second post.
  • Configure Spring beans when using Spring DM. Here is a good reference for using Config Admin with Spring DM.

If you’d like to learn more about the Configuration Admin service, check out this post or the OSGi Compendium specification. In this post I’m going to describe how to set up the Configuration Admin service in an RCP application using Pax ConfMan.

What is Pax ConfMan?

The Configuration Admin service doesn’t specify any particular way of storing and accessing properties. Each implementation can do what it likes, and Pax ConfMan has opted for the simplest approach – properties files.

Setting up the target platform

The first step in getting Pax ConfMan working in your RCP application is to add the required bundles to your target platform. Here is the complete list of bundles which need to be added:

  • org.eclipse.equinox.cm (download)
  • org.eclipse.osgi.services (download)
  • org.ops4j.pax.confman.pax-confman-propsloader (download)
  • org.ops4j.pax.logging.pax-logging-api (download)
  • org.ops4j.pax.logging.pax-logging-service (download)

Also make sure to add these bundles to your product configuration and run configuration so they will be included in builds and at runtime.

Forcing Pax ConfMan to start

If you run your RCP application at this point and examine the running bundles in an OSGi console, you’ll notice that the bundles added above are not started. To make the service available at runtime, we need to force them to start using the Configuration page (new in Galileo) of the Product Configuration Editor.

This page allows us to specify that specific bundles should be automatically started when the application is launched. Note that adding bundles to this page currently wipes out necessary RCP bundle settings. After adding these back in, your config page should look like this:

confman-1

Now if you run your RCP application, you should see Pax ConfMan logging output to your console. These logs will tell you that the configuration folder cannot be found. So on to the next step!

confman-2

Adding a configuration folder

Pax ConfMan allows you to configure your OSGi application using standard Java properties files, so we need to create a directory to hold these files. To get started, create a folder called confadmin in one of plug-ins that is part of your RCP application. You can call this folder anything you like, and the ConfMan default is configurations. I think confadmin is a better name in that it distinguishes it from the configuration folder used by the OSGi framework.

Inside the confadmin folder, create two sub-folders called services and factories. These folder names are required.

confman-3

Finally, you need to tell Pax ConfMan where your folder is located, and this is done using a Java system property called bundles.configuration.location.

When running inside the Eclipse IDE, the simplest way to do this is to add an argument to your run configuration. Mine looks like this:

confman-4

Now when you run the application you should see ConfMan messages indicating that your configuration folder has been located. Of course we haven’t added any properties files yet, but the wiring is all in place.

How to handle deployment

There are a variety of ways to handle configuration files in a deployed RCP application:

  • Place your configuration files in a separate bundle and deploy that bundle as a folder instead of a jar file.
  • Add your configuration folder to the install directory by utilizing the root property in the build.properties file for a feature.
  • Use an installer script to copy the configuration files into another directory on a users machine.

No matter which option you choose, you’ll need to provide a bundles.configuration.location VM argument that points to the configuration directory.

What’s next?

Well you can now start to configure your own OSGi services using Pax ConfMan. In my next post I’ll show how to use ConfMan to configure Pax Logging in an RCP application.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (3)

RCP-based Marketcetera featured in the NY Times

by Patrick
January 15th, 2009

It’s not every day that an Eclipse Rich Client Platform application is covered in the NY Times. In fact, I can’t remember it ever occurring before.

But yesterday Marketcetera, a developer of RCP-based open-source trading software, was featured in the Bits Blog of the NY Times. Of course there’s no mention of RCP itself, but it’s nice to know that those building tools with this framework are having some success.

Yesterday also marked the 1.0 release of this product, so congratulations to everyone at Marketcetera! I’m sure I speak for everyone in the RCP community when I say we wish you all the best.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (1)

What I'll be attending at Eclipse World

by Patrick
October 27th, 2008

Tomorrow I head to Eclipse World and after doing so much training I’m really looking forward to sitting and listening to others for a change! I am going to be doing a few presentations at the conference, but in this post I wanted to focus on what I’ll be attending next week.

Converting Your Applications From Swing to SWT and the RCP

This topic is becoming increasingly important to my clients. I’ve seen more than a few projects that are trying to leverage existing AWT/Swing resources as they migrate to RCP and are struggling with how to do this properly.

Creating Graphical Editors and Views Using Eclipse GEF

I’ve used GEF occasionally over the past few years, but I’ve never had the opportunity to hear it described in a systematic way. I’m also excited to hear some more about Zest, which I’d love to start using in upcoming projects.

RAP or GWT: Which Java-Based AJAX Technology Is for You?

RIA technologies look to become central to future Eclipse architectures (see the e4 project for the details). I have to admit I’m still somewhat ambivalent about thin-clients and would rather see rich clients with awesome provisioning support instead.

Java UI Testing Patterns and Best Practices

UI testing is always problematic and I think approaching this topic from a patterns and best-practices angle makes a lot of sense. I’m particularly interested in ways to create UIs that are designed to be testable.

So that’s what I’ll be attending this year, and if you see me at the conference be sure to stop me and say hi. And if anyone is interested in having a beer or something, just let me know!

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (0)

Public RCP Quickstart course in Washington DC area

by Patrick
October 14th, 2008

I try to keep marketing posts to a minimum on this blog (I think this is my first one…), but I’m excited to say I’m going to be offering my first public RCP Quickstart course in early November. I often get requests for RCP training from smaller groups of developers and up to this point I haven’t been able to meet this need. Finally, I’ve managed to find the time to schedule a public course that may work for these developers.

So if you’re interested in RCP training and the Washington DC area is convenient for you, I hope you’ll consider attending in November. To get started, you can check out the course syllabus and registration information.

On a slightly different note, I’ve just finished offering my first remote training course to a group of developers in Australia (hello to the gang in Melbourne!). The course went extremely well and it’s got me very interested in offering further remote courses. I’d be willing to offer public or private remote training classes for fairly small groups, so this may also be an option for smaller development teams, or for those in Australia :-)

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (1)

Creating a good presentation

by Patrick
September 15th, 2008

We all like to attend conferences and most people like the idea of presenting at one. But when the excitement of your submission acceptance fades, many of us sit down to face an empty PowerPoint deck and wonder where to start. Creating an effective presentation is a difficult task and it’s made even more difficult by the fact that most of us have never been taught how to do it. 

I’ve spent some time this summer thinking about presentations and reading what I can on the subject. I’m hoping this makes me a better communicator, and in any case I now know what I’m doing wrong! For those of you currently working on presentations or thinking about submitting for next year’s EclipseCon, here are two books I highly recommend.

Presentation Zen

This book by Garr Reynolds is fundamentally about getting your head in the right place. Stylistically, the emphasis is on graphical simplicity and storytelling, but to me the best parts were those that got me focused on why I want to present in the first place. Read this book first to get inspired by what great presentations can accomplish. And also check out Garr’s blog which is full of good information.

One of the best suggestions Garr has is to watch great presenters at work. Spend a few hours watching TED presentations, and you’ll have a new appreciation for how good a presentation can be.

slide:ology

Nancy Duarte’s claim to fame is that she developed the slides used by Al Gore in his talks about global warming. In this book she goes into great detail about how to create an effective presentation. The emphasis here is on the nuts and bolts of creating (but not giving) a presentation, and believe me if you’re not a graphic designer this information will help a lot. By the way, this book is also available on O’Reilly’s Safari Books Online.

If you act on the information in these two books, you’ll be well on your way to becoming a great presenter and your audiences will thank you for it.

I’m in the early stages of incorporating this material into my work, but I can already see some benefits. And if anyone in the Chicagoland area would like to see where I’m at right now, I’ll be speaking tomorrow (September 16th) at CJUG on the topic of “OSGi: Why Java Modularity Matters”.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (5)

Using Clover with PDE Build

by Patrick
September 11th, 2008

In a previous post I mentioned that I had not yet found a way to use Clover to perform coverage analysis when running PDE Build and the Eclipse Testing Framework. A very kind reader (thanks Nihal!) has posted a comment outlining how to get this combo running. I have to tell you, the solution is not for the feint of heart. But if you really need to use Clover, give it a try. As for me, I think I’ll stick with EMMA.

On a different note, I’m currently in the Houston airport catching a flight out before Hurricane Ike hits. To any Eclipse developers living in the Houston area (especially the students at this weeks RCP Quickstart class), stay safe and I wish you all the best.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (0)

How to brand Eclipse RCP?

by Patrick
August 7th, 2008

In response to my last post on Eclipse RCP Trends, Chris Aniszczyk commented:

Deep down inside… I think it’s a marketing issue… we have done a poor job marketing RCP in my opinion. We have brand confusion that when people hear Eclipse still they think IDE, not a rich client platform. It’s my hope that with the new Runtime project, we have a chance to rebrand Eclipse into more of a platform under the Equinox umbrella.

I couldn’t agree more, and I’ve spent some time this summer trying to wrap my head around this issue. I should say up front that I have zero marketing experience. But on the other hand, I have spent a lot of time with RCP newcomers and have some experience viewing this technology through their eyes.

So what did I come up with? Well this might sound pretty obvious to some, but my conclusion is that RCP = modularity. Period. If you want to assemble (dynamically or otherwise) an application from a set of components/plug-ins/bundles/whatever, then RCP is the tool for you. Sure it’s a UI toolkit, sure it offers a workbench, preference pages, etc. But the core idea that animates RCP is modularity.

The good news is that Java modularity in general and OSGi/Equinox in particular are playing an increasingly important role in software development. We need to ride this trend and make clear that RCP is the visual expression of Java modularity. When you want to apply the principles of Java modularity in the UI space, RCP is the tool for you.

From a marketing point of view, this brings me to the same conclusion that Chris reached above. Basically, RCP needs to be rebranded as part of a suite of technologies related to Java modularity. In other words, RCP needs to become the Equinox UI.

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (16)

Creating a test environment for the Eclipse Testing Framework

by Patrick
August 1st, 2008

Running unit tests with the Eclipse Testing Framework can be a real pain. I’ve tried to provide some help in previous posts. But one thing I haven’t addressed is how to properly set up a unit test environment.

The first question you might have is what is a test environment and why do I need one?. Well the short answer is that the Eclipse Testing Framework has a set of plug-ins it needs to run. The complete set of necessary plug-ins I refer to as a test environment. Yes, I just made this up, but it works for me.

In almost all cases, a test environment is composed of three things:

  1. A complete copy of the Eclipse SDK.
  2. The Eclipse Testing Framework.
  3. Your code. This includes both your production plug-ins along with any plug-ins or fragments containing unit tests.
I prefer to create this test environment on the fly during the build process. This is much cleaner than polluting a version of Eclipse that you use for development or even the instance that you use to run PDE Build. So my first tip:


Always create a test environment from scratch every time you run your unit tests. Create a new directory, add the Eclipse SDK, the ETF, and finally your own compiled plug-ins.


It’s also important to create the test environment in the correct way. The biggest mistake people make is to attempt to copy the Eclipse installation that exists on their machine. The main reason this is a problem is that you can’t be running that instance of Eclipse during the copy operation. If you do, you will probably get errors indicating that files are locked and cannot be copied to the test environment. Another problem is that a previously run instance of Eclipse will have a ton of metadata and config info associated with it. Copying all of this will seriously slow down your build and can potentially complicate the running of JUnits. So my second tip is:


Always start the creation of your test environment by extracting an archived Eclipse SDK of the appropriate version.


Hopefully these tips will help make it somewhat easier to use the Eclipse Testing Framework. It’s really not so bad, once you get things set up properly.
DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (2)

Can you get a job doing Eclipse RCP?

by Patrick
July 30th, 2008

What is the job market like for Eclipse RCP developers? I’d say it’s pretty good. In my experience, people with RCP experience can demand their terms and sometimes even work remotely. There still isn’t a huge pool of developers with this expertise and demand seems to be increasing. If you’re looking for proof, check out this graph of historical Eclipse RCP job postings.


eclipse rcp Job Trends graph

eclipse rcp Job Trends eclipse rcp jobs

The overall numbers are still small compared to standard J2EE/web development, but things are definitely moving in the right direction. It looks like 2008 is going to be a good year for RCP developers!

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (4)

Happy Birthday RCP!

by Patrick
April 25th, 2008

Five years ago today a Bugzilla entry was submitted calling for the creation of the Eclipse Rich Client Platform. While I’m sure the idea was bouncing around before the entry was submitted, I think of this date as the point at which the idea of RCP began to become a reality.

And is it ever a reality! Over the last five years RCP has matured into an amazingly useful application development platform. RCP is now approaching its fifth major release, which will introduce the new p2 provisioning system. I can’t wait to see and be a part of what RCP will become in the future.

I’ve had the pleasure of working with RCP over most of these past 5 years, and have witnessed many success stories. I’ve seen RCP used in every type of organization you can imagine, and I’ve seen applications developed with RCP that I’m convinced would not have been possible without it.

So I’d like to take this moment to say Happy Birthday RCP!  And to all the developers who have made RCP what it is today – thank you! You’ve done an amazing job.

P.S. For any RCP developers who might be feeling thankful as well, why not show your gratitude by becoming a Friend of Eclipse?

DZoneLinkedInDeliciousDiggEvernoteFacebookFriendFeedGoogle BookmarksRedditSquidooStumbleUponTechnorati FavoritesTwitterYahoo BookmarksShare/Save
Categories Uncategorized
Comments (1)
« Previous Page
Next Page »

Want to know more about RCP training?

Get information on private training options, pricing, availability and references.

Email address

Want to learn RCP online?

There are still spots available in the next online RCP Quickstart course being held February 27 - 29.

About me

Patrick Paulin

Patrick Paulin is a software developer and trainer specializing in modular technologies such as OSGi and the Eclipse Rich Client Platform.

Patrick lives in Madison, Wisconsin with his wife and two daughters.

Email - patrick at modumind dot com

Modular Mind
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress