4.8. Advanced Examples

We now present more elaborate examples of how to develop bundles. We also want to point out the idea that this new model does not limit you from leveraging the full power of the Java platform: You can use extensions such as JavaMail™ and Java servlets. You can apply object-oriented abstraction of any complexity in your service implementation.

4.8.1. A Mailer

This bundle mainly demonstrates how to deal with nested library JAR files. It uses the JavaMail API[3] to send out an e-mail message when it is started or stopped.

[3] You can download the JavaMail class library (packaged in mail.jar) from http://ja_va.sun.com/products/javamail/index.html. Note that JavaMail requires the JavaBeans™ Activation Framework (packaged in ...

Get Programming Open Service Gateways with Java Embedded Server™ Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.