close

Filter

loading table of contents...

Blueprint Developer Manual / Version 2010

Table Of Contents

4.1.3.2 Component Artifacts

Component artifacts provide a piece of business (or other high level) functionality by bundling a set of services that are defined in library artifacts. Components follow the naming scheme "<componentKey>-component.jar. The component artifact cae-component.jar for example, bundles all services that are typically required by a CAE web application based project.

Component artifacts are automatically activated on application startup, in contrast to library artifacts. That is, Spring beans and properties are loaded into the application context and servlets and so on will be instantiated. Therefore, you can add a component by simply adding a Maven dependency. No additional steps (such as adding an import to a Spring file) are necessary.

The following files allow you to declare services for a component which are automatically activated:

  • /META-INF/coremedia/component-<componentname>.xml:

    An entry point for all component Spring beans. Either declared directly or imported from library artifacts.

  • /META-INF/coremedia/component-<componentname>.properties:

    All configuration options of the component as key/value pairs. These properties might be overridden by the concrete application.

  • /META-INF/web-fragment.xml: A Servlet 3.0 fragment of a web.xml file that declares component specific servlets, listeners, etc. (see  http://www.oracle.com/technetwork/articles/javaee/javaee6overview-part2-136353.html )

Note

Note

Usually a web-fragment.xml is not needed anymore. With Spring Boot any Servlet, Filter or Servlet *Listener instance that is a Spring bean will be registered with the embedded container automatically. For more control the *RegistrationBean classes can be used.

Search Results

Table Of Contents