You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajiv Jacob Cheriyan <ra...@gmail.com> on 2010/09/14 19:45:29 UTC

QPID Integration with Spring framework

Hi,

Can anyone give me pointers for QPID integration with Spring framework.

Thanks,
Rajiv.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: QPID Integration with Spring framework

Posted by Jonathan Robie <jo...@redhat.com>.
On 09/14/2010 01:45 PM, Rajiv Jacob Cheriyan wrote:
> Hi,
>
> Can anyone give me pointers for QPID integration with Spring framework.

This looks like it might be it:

http://www.springframework.net/

>
> We are pleased to announce that the first milestone release of the Spring AMQP 1.0 project is now available for both Java and .NET!
>
> Download it now: Spring AMQP for Java | Spring AMQP for .NET
>
> The Spring AMQP project aims to simplify the development of AMQP based applications with a POCO centric programming model.  It also aims to provide portability across AMQP implementations such as RabbitMQ and Apache Qpid.

Jonathan

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: QPID Integration with Spring framework

Posted by Andrew Kennedy <an...@gmail.com>.
Hi.

One way to use Qpid with Spring is to get your connection factory
using JNDI, with either a jndi.properties file containing a
connectionFactory line:

    java.naming.factory.initial =
org.apache.qpid.jndi.PropertiesFileInitialContextFactory
    connectionfactory.testconnectionfactory =
amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'&maxprefetch='1'

or getting it from your application server, and using it like this:

	<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
		<property name="environment">
			<props>
				<prop key="java.naming.factory.initial">org.apache.qpid.jndi.PropertiesFileInitialContextFactory</prop>
			</props>
		</property>
	</bean>

	<bean id="connectionFactory"
class="org.springframework.jms.connection.CachingConnectionFactory">
		<property name="targetConnectionFactory" ref="qpidConnectionFactory" />
		<property name="sessionCacheSize" value="10" />
	</bean>

	<bean id="qpidConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
		<property name="jndiTemplate" ref="jndiTemplate" />
		<property name="jndiName" value="testconnectionfactory" />
	</bean>

Once you have the connection factory, you can use it in a JmsTemplate
or any of the other Spring JMS classes:

	<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
		<property name="connectionFactory" ref="connectionFactory" />
		<property name="sessionTransacted" value="true" />
	</bean>

Andrew.
--
-- andrew d kennedy ? edinburgh : +44 7941 197 134

On 15 September 2010 10:02, Marnie McCormack
<ma...@googlemail.com> wrote:
> There's an example config for Qpid with spring here:
>
> https://cwiki.apache.org/qpid/qpid-java-faq.html#QpidJavaFAQ-I%2527musingSpringandWeblogiccanyouhelpmewiththeconfigurationformovingovertoQpid
> Marnie
> On Tue, Sep 14, 2010 at 11:24 PM, Robbie Gemmell
> <ro...@gmail.com>wrote:
>
>> Our Java client implements the JMS API which you can then leverage through
>> Spring.
>>
>> Robbie
>>
>> > -----Original Message-----
>> > From: Rajiv Jacob Cheriyan [mailto:rajivjacob@gmail.com]
>> > Sent: 14 September 2010 18:45
>> > To: users@qpid.apache.org
>> > Subject: QPID Integration with Spring framework
>> >
>> > Hi,
>> >
>> > Can anyone give me pointers for QPID integration with Spring framework.
>> >
>> > Thanks,
>> > Rajiv.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: QPID Integration with Spring framework

Posted by Marnie McCormack <ma...@googlemail.com>.
There's an example config for Qpid with spring here:

https://cwiki.apache.org/qpid/qpid-java-faq.html#QpidJavaFAQ-I%2527musingSpringandWeblogiccanyouhelpmewiththeconfigurationformovingovertoQpid
Marnie
On Tue, Sep 14, 2010 at 11:24 PM, Robbie Gemmell
<ro...@gmail.com>wrote:

> Our Java client implements the JMS API which you can then leverage through
> Spring.
>
> Robbie
>
> > -----Original Message-----
> > From: Rajiv Jacob Cheriyan [mailto:rajivjacob@gmail.com]
> > Sent: 14 September 2010 18:45
> > To: users@qpid.apache.org
> > Subject: QPID Integration with Spring framework
> >
> > Hi,
> >
> > Can anyone give me pointers for QPID integration with Spring framework.
> >
> > Thanks,
> > Rajiv.
> >
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project:      http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

RE: QPID Integration with Spring framework

Posted by Robbie Gemmell <ro...@gmail.com>.
Our Java client implements the JMS API which you can then leverage through
Spring.

Robbie

> -----Original Message-----
> From: Rajiv Jacob Cheriyan [mailto:rajivjacob@gmail.com]
> Sent: 14 September 2010 18:45
> To: users@qpid.apache.org
> Subject: QPID Integration with Spring framework
> 
> Hi,
> 
> Can anyone give me pointers for QPID integration with Spring framework.
> 
> Thanks,
> Rajiv.
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org