Java Reference
In-Depth Information
To see this work, you need to enable it using a fragment. Let's first take a look at the Spring
XML configuration. Here, we declare a properties bean that in turn contains our property key,
process.annotations .
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=" http://www.springframework.org/schema/beans"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=" http://www.springframework.org/schema/context"
xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<bean name="extenderProperties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="process.annotations">true</prop>
</props>
</property>
</bean>
</beans>
Change the Default HTTP Server that Spring Uses When Deploying a .WAR
Spring Dynamic Modules provides the ability to install OSGi bundles as web applications. It uses an
instance of org.springframework.osgi.web.deployer.WarDeployer to perform this feat. Currently, the
default is org.springframework.osgi.web.deployer.tomcat.TomcatWarDeployer . You can change this to
use Jetty, should you like.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=" http://www.springframework.org/schema/beans"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
xmlns:context=" http://www.springframework.org/schema/context"
xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<bean name="warDeployer"
class="org.springframework.osgi.web.deployer.jetty.JettyWarDeployer"/>
</beans>
12-7. Using SpringSource dm Server
Problem
You're convinced of the potential of OSGi, but you feel that perhaps, even with Spring Dynamic
Modules, the investment might be hard to justify without some serious upgrades to the tooling and a
general smoothing out of the road. Such upgrades would enhance monitoring, provide better, more
 
Search WWH ::




Custom Search