tags:

views:

26

answers:

1

I have a Flex / Spring / LCDS project, and I'm trying to use the Spring/Flex integration module.

It works fine for exposing simple destinations & messaging end-points, however I'm unsure how to configure to use Assemblers.

The vanilla, no-Spring-integration-way involves declaring a destination such as:

<destination id="book.service">
    <properties>
        <source>flex.data.assemblers.HibernateAnnotationsAssembler</source>
        <item-class>com.library.Book</item-class>
    </properties>
</destination>

However, when I try to integrate this approach with Spring, I come unstuck.

This destination needs an adapter. Running as-is, allowing the Spring/Flex integration to install the default remoting adapter doesn't work, as I get the following error at rumtime:

 Caused by: flex.messaging.config.ConfigurationException: Destination 'book.service' must specify at least one adapter.

How do I connect this destination to the adapter?

Also, will the HibernateAnnotationsAssember detect and integrate with the Spring managed Hibernate sessions, or does this require additional config as well?

+1  A: 

From what I know Spring is fully integrated only with BlazeDS..you cannot expose Spring beans (assemblers) as destinations.

Cornel Creanga
Thanks for your response, however it's slightly misleading. The Flex/Spring integration package works fine when exposing a Spring Bean as a destination for remoting. However, exposing a spring bean as an assembler does not work.
Marty Pitt
Yep, that's what I've tried to say with "only with BlazeDS" :)
Cornel Creanga