History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-532
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Andres Bernasconi
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
XFire

Add Flexibility for customizing Transports in DefaultTransportManager (patch included) - Relates to XFire-177

Created: 14/Jul/06 08:21 AM   Updated: 20/Aug/06 12:37 PM
Component/s: None
Affects Version/s: 1.1.2
Fix Version/s: 1.2

Time Tracking:
Not Specified

File Attachments: 1. Java Source File ConfigurableTransportManager.java (4 kb)

Environment: I need to add a JMS Transport and want to do it by configuring everything with Spring.


 Description  « Hide
I want to configure a new (JMS) Transport with Spring but I can't add it to the DefaultTransportManager because the currently supported transports are hardwired and there is no way to inject a new one.

I am suggesting and submitting this patch to make the DefaultTransportManager easily configurable in a way that a new Tranposrt can be injected. Old (default) Transports are still hardwired (just in case it was done like this for some reason).

The spring configuration would be as follows:

<bean id="JMSTransport"
		class="org.codehaus.xfire.transport.jms.JMSTransport">
		<constructor-arg ref="xfire" />
		<constructor-arg>
			<bean
				class="org.springframework.jndi.JndiObjectFactoryBean">
				<property name="jndiTemplate" ref="jndiTemplate" />
				<property name="jndiName"
					value="jms/snm/troubleshooting/AsyncMessageConnectionFactory" />
			</bean>
		</constructor-arg>
	</bean>
	<bean id="configurableTransportManager"
		class="org.codehaus.xfire.transport.ConfigurableTransportManager" singleton="true" init-method="initialize" destroy-method="dispose">
		<property name="additionalTransports">
			<list>
				<ref bean="JMSTransport"/>
			</list>
		</property>
	</bean>

	<bean id="xfire.JMSServiceFactory"
		class="org.codehaus.xfire.service.binding.ObjectServiceFactory"
		singleton="true">
		<constructor-arg index="0">
			<ref bean="configurableTransportManager" />
		</constructor-arg>
		<constructor-arg index="1">
			<ref bean="xfire.aegisBindingProvider" />
		</constructor-arg>
	</bean>

The problem I am facing right now is that the automatically generated WSDL file is not including this binding (I want this service to be binded both with HTTP and JMS)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Christoph Sturm - 14/Sep/07 07:19 AM
setting fix version to 1.2 because 1.1.2 is already released, and affects-version is also 1.1.2, so how should it be fixed in 1.1.2?

Dan Diephouse - 20/Aug/06 12:37 PM
I just added a constructor to DefaultTransportManager in which you can specify a Set of transports. If you run the initialize() method, the default transports will get constructed as well.