Jeff, thanks for the info. I was under the impression that Adobe opened the HibernateAdapter code.  Am I wrong?

Can you point me where I can find it?

Thanks again,
Valy





Jeff Vroom <[EMAIL PROTECTED]> wrote:
First off, on the original question about SpringBeanAdapter, if you can use FDS I recommend that you check out the Spring Flex Factory on the Adobe component exchange:
 
 
With this component, it just takes a few lines of XML to allow a Flex client to call a method on a spring component.  
 
For the hibernate stuff, if you use a remote object to access hibernate you run into the challenges mentioned below when hibernate is using lazy loading of properties.  If however, you use Flex Data Management Services we solve those problems for you.  We also supply the Java source code for the hibernate assembler with FDS so you can see how we got around the lazy loading and “duplicate instance” problems with hibernate.   Basically we fetch all properties in the hibernate object before the session is closed (unless that property is marked as lazy in the FDMS configuration in which case only the id of that object must be available).
 
Jeff
 

From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On Behalf Of laidezmon
Sent: Wednesday, September 20, 2006 10:18 AM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Re: Using SpringBeanAdapter instead of FDS
 
I am developing an app that uses the remote object tied to a
java/spring/hybernate app like you describe. This was a legacy app
already written with a jsf front end, and for the most part, the flex
stuff has gone over the business logic, pretty well. There have been a
couple bumps in the road, but that could have something to do with the
way I am implementing it. One of the things I have noticed, is you are
not able to lazy load your hybernate objects, so an object with one to
many or many to many relationships will error out. You must pass back
to flex fully completed java objects when it asks for them. Also when
you pass an object to flex, then edit it, and pass it back, I was
getting hybernate duplicate object errors. The reason for this is that
hybernate is still maintaining the instance of that object, and if you
make a change to it, based on id, then it considers them as two
objects of the same ID. you can either merge the two of them, delete
the hybernate instance, or create a new object based off the flex
object being passed, then set the hybernate object params to the flex
object params using the getters and setters.

So its not completely seamless, but it shows some promise. Course I
could be doing it totally wrong too. I know this way works but it
might not be a best practice. This to me seems an area of flex sorely
in need of better documentation. There are no tutorials or
walkthroughs of anything beyond simple objects being passed to and
from java, and usually not having anything to do with spring and
hybernate connections. At least if there are some tutorials on passing
complex objects (meaning an object with at least another object
embedded in it) back and forth using spring/hybernate in either remote
object or dataservices I have not found it and would love to see it.

--- In [EMAIL PROTECTED]ups.com, "dreuimar" <[EMAIL PROTECTED]> wrote:
>
> Hey everyone,
>
> I'm currently constructing an application that uses DataServices with
> the Hibernate Assembler. I wanted to make the business logic
> independent of the view (Flex) so that another application I write
> with a web frontend (using Spring MVC) can use the same logic that
> Flex uses. I was going to do this using Remote Objects with the
> SpringBeanAdapter, but I'm worried about losing the ability for data
> pushing, managed classes, etc. Can I still maintain many of the
> options I had with FDS using the SpringBeanAdapter?
>
> Brennan
>


How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates. __._,_.___

--
Flexcoders Mailing List
FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to