4.10. Common Mistakes

It is surprisingly easy to trip up on the journey to your first working bundle. Some of the most common logistical and syntactical mistakes are summarized in this section. More complex programmatic and design issues are addressed in Chapter 6.

4.10.1. Activator

  • The activator must be defined as a public class because it is to be accessed by the framework. Do not make it package private.

  • The activator must have a public default no-arg constructor. Not defining any constructor is fine, because the default constructor will be automatically provided. However, if you explicitly define a constructor other than the no-arg constructor, no default constructor will be provided. This causes a failure when the framework tries to instantiate ...

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.