We have the JBoss implementation of EJB 3.0 working with
Flex. The JBoss implementation of EJB 3.0 is really hibernate
annotations... In this configuration, Flex does not need to talk
directly to Hibernate, and we have the full power of the new EJB
3.0 Annotations (beyond the support and features provided in the
HibernateAdapter). Our Assemblers use JNDI to access session beans
which work with the entity beans.
One huge problem with Flex however is that due to the
relationships between objects in the ORM, combined with FDS's
desire to access each public property, the
LazyInitializationException rears it's ugly head every time a lazy
association property is traversed.
We desparately need FDS to recognize the proxy object for
what it is - a land mine waiting to go off should the property be
touched once outside the transaction which has already been closed
(inside the serialization process to AMF or RTMP).
We currently intercept the calls to null out proxy objects
after the transaction is closed but before FDS has a chance to set
off the land mine, and this works for the most part. However, not
being able to take advantage of lazy initialization causes a lot
more data to be sent back and forth.
I would really encourage a change of FDS serialization code
to watch for the common objects used to represent the existance of
a proxy within the common ORM solutions, and jump over them when
building the object graph. It's an essential part of an application
in an ORM environment.