R
Robert Zurer
My architecture is, (ala Fowler PoEAA)
Presentation Layer
|
Service Layer
|
Problem Domain
(My Business Objects are held in memory)
|
Persistence Layer
|
Physical Storage
It is the aim that business objects be accessed by many threads at once.
There will be many more reads than writes. I will need to lock the object(s)
when they are being written but not when they are being read. I will also
need to provide some kind of transactional support.
One of my ideas was to derive all business objects from ContextBoundObject
and use the [Synchronized] attribute.
My question is this. Would this completely serialize access or is there some
way, still using ContextBoundObject, to effect something like the
ReaderWriterLock?
Also, on a different track, does anyone see problems with maintaining large
numbers of business objects in memory assuming RAM can be added if
necessary.
Robert Zurer
Presentation Layer
|
Service Layer
|
Problem Domain
(My Business Objects are held in memory)
|
Persistence Layer
|
Physical Storage
It is the aim that business objects be accessed by many threads at once.
There will be many more reads than writes. I will need to lock the object(s)
when they are being written but not when they are being read. I will also
need to provide some kind of transactional support.
One of my ideas was to derive all business objects from ContextBoundObject
and use the [Synchronized] attribute.
My question is this. Would this completely serialize access or is there some
way, still using ContextBoundObject, to effect something like the
ReaderWriterLock?
Also, on a different track, does anyone see problems with maintaining large
numbers of business objects in memory assuming RAM can be added if
necessary.
Robert Zurer