Expand my Community achievements bar.

SOLVED

FDS+Spring+Hibernate

Avatar

Level 2
If any body has worked with FDS /Hibernate/Spring

pls post the sample.

regards

anil

1 Accepted Solution

Avatar

Correct answer by
Level 2
I have a project like that, what we do is that we use the
JavaAssembler instead of the HibernateAssembler. Then the
JavaAssembler obtains a HibernateDAO via Spring
(applicationContext.xml).

View solution in original post

13 Replies

Avatar

Level 2
thanks.

but i want sample that contain all three thing
FDS,Hibernate,Spring.

Avatar

Former Community Member
I'm not aware of Spring+Hibernate+FDS sample but Christophe
has Spring+FDS and Hibernate+FDS examples, it should be pretty
straightforward to combine the two to do whatever you need.

Avatar

Level 2
I tried but confused to code Assembler file inside
Data-management-config.xml.

Avatar

Former Community Member
Explain what you're confused about so we can try to
help.

Avatar

Level 2
Hi,

For Hibernate + FDS we add Hibernate Assembler class inside
Data-management-config.xml.

But In case of Spring+FDS we code for assembler file .

i am confused to code Assember File in case of
Spring+Hibernate+FDS





Avatar

Level 2
I have a project like that, what we do is that we use the
JavaAssembler instead of the HibernateAssembler. Then the
JavaAssembler obtains a HibernateDAO via Spring
(applicationContext.xml).

Avatar

Correct answer by
Level 2
I have a project like that, what we do is that we use the
JavaAssembler instead of the HibernateAssembler. Then the
JavaAssembler obtains a HibernateDAO via Spring
(applicationContext.xml).

Avatar

Level 2
Hi dimival,

now in this way i am doing. but now i am getting null
exception while calling fill method.

i have coded fill method inside javaAssembler that will call
getProduct method from HibernateDao.

Avatar

Level 2
thanks all

Now everything is working fine



Avatar

Level 1
Have a look at our blog entry about using FDS, Hibernate and
Spring, inspired by Christophe's postings.




http://devissimo.blogspot.com/

Avatar

Level 1
Here is an easy to use Flex - Spring Integration Example.
From there it is basicly just Spring stuff




http://www.wowww.nl/wordpress/?p=58



regards,



Marc

Avatar

Level 1
The posts here that point to examples of Spring + FDS and
separate examples of Hibernate + FDS and then say combining the two
should be easy seem to be missing the point. This is not as easy an
straight forward as it seems it should be.



Spring + Hibernate + FDS is a completely different animal
because you are getting Spring to handle the Session Factory
configuration and your DAO's as Spring beans but you also want the
handling of lazy initialization and proxy serialization as shown in
the HibernateAssembler.



The current HibernateAssembler code handles all of the
Hibernate setup. I would much rather have Spring do this. What I
would like is for my HibernateProxy's for non initialized
associations to be serialized rather than traversed resulting
LazyInitializationExceptions. The HibernateAssembler seems to
tackle this with a very mysterious piece of code:




PropertyProxyRegistry.getRegistry().register(HibernateProxy.class,
new HibernatePropertyProxy());



PropertyProxyRegistry and HibernatePropertyProxy are not
documented anywhere, and in fact a Google on PropertyProxyRegistry
returns 0 results. However, my intuition tells me this piece of
code should tell serialization to proxy the HibernateProxy with a
flex class called HibernatePropertyProxy which will just serialize
an id of an association rather than attempting to serialize the
uninitialized associated class.



I cannot get this to work though and as there is no
documentation and no discussion on these classes, I have no way of
verifying it. If my intuition is correct, this is a very useful
mechanism. I only wish it was documented b/c if it did work as
expected it would make a Hibernate + Spring + FDS implementation
pretty easy.



Anyone know anything about this?