XFire

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

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1.2
  • Fix Version/s: 1.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    I need to add a JMS Transport and want to do it by configuring everything with Spring.
  • Number of attachments :
    1

Description

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)

Activity

Hide
Christoph Sturm added a comment -

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?

Show
Christoph Sturm added a comment - 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?
Hide
Dan Diephouse added a comment -

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.

Show
Dan Diephouse added a comment - 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.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: