Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Tree-like data structure in J2EE
Hi,

In my project I'm trying to use the Value Object Patern (aka Bulck Data Obje
ct Patern)
Nut, my VOs can refer to other VOs like a tree in witch a node can refer to 
another node.
Is a structure like this one, is possible that in some point a VO references
 a VO in its owner upper
structure , like this

A -> B -> C -> A

The problem when loading this VO is that I get a infinite loop.
The client requests a VO from the server. In the server, a facade Stateless 
Session Bean is in
charge of compiling the request. For this , the bean consults various entity
 beans constructing the
various VO.
So to parcialy resolve the problem I use a POJO that acts as a memory (a cac
he). Each time a VO is
loaded is added to the memory. The next time is requested, the cached object
 is returned.
This works fine, the problem is that by caching the objects I lose control i
f they are updated or
not since another separated process is in charge of saving the VO send by th
e client. (this process
is implemented in the stateless bean). So, when saving I remove the object f
rom the loading memory,
and when loading I remove the object from the saving memory. (the same loop 
occurs when saving, so
use the memory to avoid saving the same object over and over).

For a single client acessing the server this works , but for multiple client
es I have a serious
cuncurrency problem. Because this is becaming very non-standard I ask you if
 anyone had a similar
problem and how it was workedarround. Or, if there is a special pattern for 
this kind of VO. Or, if
anyone as any idea , at all, that can help solving the cunccurency problem.

Thanks in advance.

Report this thread to moderator Post Follow-up to this message
Old Post
SMMT
12-10-04 08:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:38 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.