-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Hibernate with Flash Remoting / OpenAMF
PostPosted: Wed Feb 11, 2004 8:43 am 
Newbie

Joined: Mon Sep 29, 2003 6:47 am
Posts: 7
Hi all,

Has anyone tried to combine Hibernate with Flash remoting?

I'm just wondering if any changes made to the ASTranslator (JavaBean translated ActionScript objects) would be made back in the Hibernate Entity in the server...

-Ian


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 8:50 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I designed and implemented a medium-size project with both. AMF and Flash remoting sucks, it's even worse than "traditional" webservices. About your question: Both are not related and don't influence each other. Why should they?

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 9:14 am 
Newbie

Joined: Mon Sep 29, 2003 6:47 am
Posts: 7
Thanks for the quick reply.

I'm simply evaluating the rich client UI at the moment, using Spring with Hibernate for the persistance layer is a no-brainer, it's a great combination.

All I was hoping for was a system where I could lookup an Object via a service which quieried Hibernate, pass this object to my Flash UI, make some changes, pass it back to the service and persist the changes.

This is just for an experimental project, not client related at all. If the feeling is that I should avoid Flash Remoting like the plague, what other options do I have?

I'm using GLUE at the moment for Web Services, and I like its simplicity and ease of use. Perhaps this could replace the Flash Remoting connectivity.

Is anyone here using Flex? Hopefully it'll provide richer support for these features.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 9:22 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It will not work, at least not out of the box. As is the case with most idiotic webservice interfaces, AMF can only transport almost completely serialized objects. This means you can use:

- primitives or primitive wrappers
- arrays of them

So you have to flatten your richly typed object graph to that structure. The same applies if the object comes back from AMF. Together with the closed, proprietary and unknown API and protocol that AMF is, a horrible combination. I worked together with two very talented and skilled Flash developers and we had unbelievable problems. You can't debug Flash applications properly and it's overall a real pain. I really can't recommend it. Use Swing/Webstart for rich clients (or SWT/Eclipse...), but don't use anything Macromedia sells. They have no idea at all what software development is.

Note: The commercial Flash remoting (and OpenAMF) had no concept of security. Thats right, any client can call any method on the server. Just call it by name and reflection will do the rest, even System.shutdown(). We then added method-based access control lists to OpenAMF, but Macromedia AFAIK still denies that there is any problem in their FAQs.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 10:33 am 
Newbie

Joined: Mon Sep 29, 2003 6:47 am
Posts: 7
in short: WOW.

Sounds like I'll stick with Hibernate & Spring for the data-access and Struts for the frontend, I'll just create a few rich UI components in flash and use them for navigation.

Thanks for your frank and open replies, it's good to get in contact with devs who have experience of these technologies.


Top
 Profile  
 
 Post subject: Flattening objects to send to web services
PostPosted: Mon Nov 16, 2009 7:33 am 
Newbie

Joined: Mon Nov 16, 2009 7:23 am
Posts: 7
I need to do something very similar. I'm building a web service client and server for synchronization in a distributed database application, where nodes use Hibernate to access their backing stores, and records are held as POJOs in memory.

So far I've been working on using reflection to serialize and deserialize the object, but this breaks after it's sent via the web service, because CXF creates proxy objects which have new members that I don't want to see or touch (e.g. handler). Also the logic is very complex, inefficient and probably buggy.

I know that Hibernate is perfectly capable of flattening my objects, as it does it whenever I call save(), but I can't find any sample code to get the flattened data without going direct to the database with JDBC. Does anyone have any ideas? Do I just get the mapping (PersistentClass), iterate over its properties and disassemble() them? If I re-assemble() the serialized data into POJOs, what happens to associated objects? Is any of this documented or supported in any way, or am I messing with Hibernate internals here?

Cheers, Chris.


Top
 Profile  
 
 Post subject: Re: Hibernate with Flash Remoting / OpenAMF
PostPosted: Thu Nov 26, 2009 11:47 am 
Newbie

Joined: Mon Nov 16, 2009 7:23 am
Posts: 7
I found the answer: an officially supported way to access metadata.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.