25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 16 ■ Messaging with Your <strong>Spring</strong> Application<br />

Listing 16-7 shows you the JDBC XML configuration, but why are you using this JDBC if you are going to use the<br />

RabbitMQ anyway? Well, you need to have some documents to send, right? So you are going to use the ones either in<br />

the in-memory database using JDBC or the documents in the MongoDB server. So let’s also see the MongoDB XML<br />

configuration in Listing 16-8.<br />

Listing 16-8. mydocuments-mongo-context.xml<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

In Listings 16-7 and Listing 16-8, you are going to just take the documents from the in-memory database and the<br />

MongoDB server.<br />

Next, let’s see the Marshaller bean definition, shown in Listing 16-9. This XML configuration has the beans that<br />

will help to convert your documents into XML and vice versa.<br />

Listing 16-9. mydocuments-oxm-context.xml<br />

<br />

<br />

<br />

<br />

<br />

<br />

com.apress.isf.java.model.Document<br />

<br />

<br />

<br />

<br />

<br />

223

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!