Fórum
Pre-loader - Instructions INSERT ( Service )
Leandro Concon, modificado 11 Anos atrás.
Pre-loader - Instructions INSERT ( Service )
New Member Postagens: 8 Data de Entrada: 27/06/12 Postagens Recentes
it is possible to execute instructions during the insert deploy the portlet? I would run the same happens with the creation of the tables in the table.sql.
David H Nebinger, modificado 11 Anos atrás.
RE: Pre-loader - Instructions INSERT ( Service )
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Usually you would do this using a normal startup process including some sort of check to determine if it was ever completed before.
For example, I've used afterPropertiesSet() to determine if there are any entities available; when no entities, I know it's the first time my code is being executed and I can create my initial entities.
For example, I've used afterPropertiesSet() to determine if there are any entities available; when no entities, I know it's the first time my code is being executed and I can create my initial entities.