Many thanks... your factory bean idea is brilliant.
I have one wrinkle to cure. There are two ways to push the xml file contents into this jms bean and both use the same named 'configuration' property...
<bean id="jmsFactory" class="org.mr.api.jms.MantaConnectionFactory" >
<bean class="org.apache.commons.io.IOUtils" factory-method="toString">
<constructor-arg type="java.io.InputStream" value="classpath:mantaray_config.xml"/>
* the first has 'configuration' as a string and will take the xml file content
* the second has 'configuration' as an XML Element and will take a DOM model as its parameter.
When I run a standalone test app then the 'IOUtils' factory bean idea works perfectly, as the spring bean application context file parser finds 'configuration' as a string property.
However, when I run my Spring web app the same code fails as the bean xml parser is finding configuration as the Element parameter, see...
Is it possible to define the 'configuration' type parameter type as string only?
aused by: java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [org.w3c.dom.Element] for property 'configuration': no matching editors or conversion strategy found