A filter that creates a Cayenne server runtime, possibly including custom modules. By
default runtime includes
ServerModule
and
WebModule
. Any custom modules
are loaded after the two standard ones to allow custom service overrides. Filter
initialization parameters:
- configuration-location - (optional) a name of Cayenne configuration XML file that
will be used to load Cayenne stack. If missing, the filter name will be used to derive
the location. ".xml" extension will be appended to the filter name to get the location,
so a filter named "cayenne-foo" will result in location "cayenne-foo.xml".
- extra-modules - (optional) a comma or space-separated list of class names, with
each class implementing
Module
interface. These are the custom modules loaded
after the two standard ones that allow users to override any Cayenne runtime aspects,
e.g. RequestHandler
. Each custom module must have a no-arg constructor.
CayenneFilter is a great utility to quickly start a Cayenne application. More advanced
apps most likely will not use it, relying on their own configuration mechanism (such as
Guice, Spring, etc.)