The Spring container is configured in the spring_container.xml
file located in the following directory of your installation:
InstallDir
/containers/spring_container/etc
The contents of the Spring container configuration file are shown in Example 5.2.
Example 5.2. spring_container.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:container="http://schemas.iona.com/soa/container-config" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://schemas.iona.com/soa/container-config http://schemas.iona.com/soa/container-config.xsd"> <!-- Bean definition for Container --> <container:container id="container" containerRepository="C:\iona\fuse-services-framework/containers/spring_container/repository" scanInterval="5000"/><!-- Web Service Container Management --> <jaxws:endpoint id="ContainerService"
implementor="#ContainerServiceImpl" address="http://localhost:2222/AdminContext/AdminPort" wsdlLocation="/wsdl/container.wsdl" endpointName="e:ContainerServicePort" serviceName="s:ContainerService" xmlns:e="http://cxf.iona.com/container/admin" xmlns:s="http://cxf.iona.com/container/admin"/> <bean id="ContainerServiceImpl" class="com.iona.cxf.container.admin.ContainerAdminServiceImpl"> <property name="container"> <ref bean="container" /> </property> </bean> <!-- JMX Container Management --> <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" /> </bean> <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"> <property name="beans"> <map> <entry key="bean:name=SpringContainer" value-ref="container"/> <entry key="connector:name=rmi" value-ref="serverConnector"/> </map> </property> <property name="server" ref="mbeanServer"/> <property name="assembler" ref="assembler" /> </bean> <bean id="assembler" class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler"> <property name="interfaceMappings"> <props> <prop key="bean:name=SpringContainer">com.iona.cxf.container.managed.JMXContainer</prop> </props> </property> </bean> <bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry"> <property name="serviceUrl" value="service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/server"/> </bean> <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"> <property name="port" value="1099"/> </bean> </beans>
The XML shown in Example 5.2 does the following:
Defines a bean that encapsulates the logic for the Spring container. This bean handles the logic for deploying user applications that are copied to
the specified container repository location. The default container repository location is: The | |
Defines an application that creates a Web service interface that you can use to manage the Spring container. The To change the port on which the Web service interface listens, change the | |
Defines Spring beans that allow you to use a JMX console to manage the Spring container. For more information, see the JMX chapter of the Spring 2.0.x reference document available at http://static.springframework.org/spring/docs/2.0.x/reference/jmx.html. |