cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Rosi-Schwartz <Barbara.Rosi-Schwa...@iggroup.com>
Subject How to use the Cocoon Spring Configurator with "hidden" properties
Date Fri, 10 Feb 2012 09:13:22 GMT
Hello everyone.

I want to use the Spring Configurator to configure access ports for my JMX MBeans, with ports
changing for the different development environments.

The spring configuration file contains the following:

<bean id="featureLauncherMBean"
            class="com.iggroup.wb.core.featurelauncher.internal.DefaultFeatureLauncher"
            init-method="init" destroy-method="dismissAllFeatures">
</bean>

<util:map id="exposedMBeans">
      <entry key="bean:type=featureLauncherMBean,name=remoteJMX"
            value-ref="featureLauncherMBean" />
</util:map>

<bean id="mBeanExporter" class="org.springframework.jmx.export.MBeanExporter"
      p:beans-ref="exposedMBeans" p:assembler-ref="assembler" />

<util:list id="manageableInterfaces">
      <value>com.iggroup.wb.core.featurelauncher.api.FeatureLauncherMBean</value>
</util:list>

<bean id="assembler"
      class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler"
      p:managedInterfaces-ref="manageableInterfaces" />

<bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"
      p:port="1099" />

<bean id="serverConnector"
      class="org.springframework.jmx.support.ConnectorServerFactoryBean"
      depends-on="registry" p:objectName="connector:name=rmi"
      p:serviceUrl="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxrmi" />

The first bean, featureLauncherMBean,  is the one I work with directly but the ones that contain
the environment dependent properties are registry (port property) and serverConnector (serviceUrl
property).These beans are just part of the wiring and  I cannot access them directly.

How would I go about using the Configurator to get port and serviceUrl to point to the right
port values depending upon the environment?

TIA,
B.

BARBARA ROSI-SCHWARTZ
Senior Developer

IG Group|Cannon Bridge House
25 Dowgate Hill|London|EC4R ZYA

t: +44(0)20 7573 0208 (Direct)
t: +44(0)20 7896 0011 (Switchboard)
w: www.iggroup.com


________________________________
The information contained in this email is strictly confidential and for the use of the addressee
only, unless otherwise indicated. If you are not the intended recipient, please do not read,
copy, use or disclose to others this message or any attachment. Please also notify the sender
by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email
and any copies of it. Opinions, conclusions (etc) that do not relate to the official business
of this company shall be understood as neither given nor endorsed by it. IG Group Holdings
plc is a company registered in England and Wales under number 04677092. VAT registration number
761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Listed
on the London Stock Exchange. Its subsidiaries IG Markets Limited and IG Index Limited are
authorised and regulated by the Financial Services Authority (IG Markets Limited FSA registration
number 195355 and IG Index Limited FSA registration number 114059).

Mime
View raw message