• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XMLDecoder -> how to update the properties previously deserialized javabeans [newbie]

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
As this post is mostly about javabeans deserialization, I hope it won't be too much off-topic. I apologize if this is the case but I couldn't find a better place for that post in Javaranch.
We're developping the client part of a 3 tier application. The main principle is the following:
The application server delivers XML JInternalFrame descriptions to the client.
The client then deserializes them (and all their contained components) using an XMLDecoder and adds it to a JDesktopPane
Now let's say that the displayed data have been changed server side (let's say by another user).
As the client data must always be "in sync" with the serverside db, the server must send another XML document to the client describing the properties changes for it to update the frame components (tables or textfields let's say).
It seems that I can't use the XMLDecoder to achieve this : once the beans deserialized, it seems to lose all the references to them. We can only use the XMLDecoder "idref mechanism" with beans described in the current XML document.
What would be a good way to handle this?
Subclassing the XMLDecoder to make it keep the references to beans as long as the frames they're contained in aren't closed could be a solution but probably not a good one.
Anyone there would have an idea?
 
reply
    Bookmark Topic Watch Topic
  • New Topic