Foros de discusión

service builder / entity read only

thumbnail
Michel Wicky, modificado hace 12 años.

service builder / entity read only

Regular Member Mensajes: 130 Fecha de incorporación: 3/07/10 Mensajes recientes
J'ai un ensemble de tables que je n'accède que pour alimenter un explorateur avec affichage de détails (à la window explorer) pour ne gérer la persistance que d'une seule table finalement.
Comment est-ce que je peux déclarer mes entités comme étant read only dans les définitions service.xml pour créer le moins de overhead possible ?
Merci
thumbnail
Juan Fernández, modificado hace 12 años.

RE: service builder / entity read only

Liferay Legend Mensajes: 1261 Fecha de incorporación: 2/10/08 Mensajes recientes
Hum... je crois que ça n'est pas supporté par le service builder de Liferay, Michel.
Tu crois que ça vous donnerá une grande ameilloration de [performance]?
thumbnail
Michel Wicky, modificado hace 12 años.

RE: service builder / entity read only

Regular Member Mensajes: 130 Fecha de incorporación: 3/07/10 Mensajes recientes
I'm convinced it is really important to develop two layers in JEE application. One to browse (application navigation) your database with specific request to get the maximum of data with the minimum of round trip from database. One to manage persistence for an occurrence you want to update with all necessary relationships.

I worked in a project with a poor design where developer used normal entity to just load a list box ... when profiling the application we have seen that for 7 entries in the list box thousands of sql statement were executed, 200 Mbytes memory were suddenly used just for that, etc. A simple read only object (named query) do the job in one round trip without any overhead.

This make sense for model with dozens of tables and relationships with some data into (>50 tables, hundreds of rows)...
thumbnail
Juan Fernández, modificado hace 12 años.

RE: service builder / entity read only

Liferay Legend Mensajes: 1261 Fecha de incorporación: 2/10/08 Mensajes recientes
Hi Michel:
maybe it's a good idea that we should analyze.
Why don't you create a new ticket in Jira, describe the problem and how good it'll be to have your improvement?
Post the link here so I can ping the correct engineers to have a look at your proposal, ok?
Thanks a lot, Michel!