try this one !

How will a container handle this design ?

I have and entity bean called "Article" that is made up of smaller parts
e.g. images, text

The images and text objects can be classed as dependants of an Article
entity bean in the sense that they are only ever viewable though a public
view (e.g. the website) when they are part of an article EB. So when I load
an "Article" EB I will also load all the images and text objects associated
with it and store them as members of the entity bean.

the catch....

However the images and text objects are also independent of an Article in
the sense that an image or text object can exist without being associated
with an article. However these objects are only viewable from a backend
admin interface where they can be created,updated and deleted. Also the same
image or text object can be associated with more then one article.

"the text or image have a many to many relationship with an Article"
eg
ONE image can be in MANY articles
ONE article can have MANY images

Although the images and text are independent of an article EB I consider
them too fine grain to be entity beans themselves. So to created,updated and
deleted the image and text objects I intend to create a Stateless Session
bean that is used to access the database tables that contain these objects.

so my question is. What happens if I am updating an image (or text) row via
the Stateless Session bean and an Article Entity bean that references this
image is trying to read this data at the same time. Will the database put a
lock on this data so that the entity bean cannot read the data until the
Session bean has updated the table or will it all mess up. What will happen
?

Thanks

Regards Peter

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to