Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Spring configuration for jetty

I've just committed an improvement to jetty-xml and jetty-spring that
allows a spring xml file to be used anywhere that you would normally
use a jetty xml file:

 * Spring ConfigurationProcessor
 * <p>
 * A {@link ConfigurationProcessor} that uses a spring XML file to
emulate the {@link XmlConfiguration} format.
 * <p>
 * {@link XmlConfiguration} expects a primary object that is either
passed in to a call to {@link #configure(Object)}
 * or that is constructed by a call to {@link #configure()}. This
processor looks for a bean definition
 * with an id, name or alias of "Main" as uses that as the primary bean.
 * <p>
 * The objects mapped by {@link XmlConfiguration#getIdMap()} are set
as singletons before any configuration calls
 * and if the spring configuration file contains a definition for the
singleton id, the the singleton is updated
 * with a call to {@link XmlBeanFactory#configureBean(Object, String)}.
 * <p>
 * The property map obtained via {@link
XmlConfiguration#getProperties()} is set as a singleton called
"properties"
 * and values can be accessed by somewhat verbose
 * usage of {@link
org.springframework.beans.factory.config.MethodInvokingFactoryBean}.
 * <p>
 * This processor is returned by the {@link
SpringConfigurationProcessorFactory} for any XML document whos first
 * element is "beans". The factory is discovered by a {@link
ServiceLoader} for {@link ConfigurationProcessorFactory}.

you should even be able to mix and match on the same command line and
the beans will be passed via the id map.

Feedback of this is feature is needed before it hits a release.

cheers


Back to the top