Foros de discusión

Clarifications

venka reddy, modificado hace 11 años.

Clarifications

Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
hi,

When we build service builder it generates Service,Persistence layers automatically, So which classes are editable classes?

Even it generated Some xml files (base-spring.xml and cluster-spring.xml ..... etc) so which xml file is going to invoke first and their execution flow?

of course those questions are silly questions but it is little bit clumsy to me to understand their execution flow
MICHAIL MOUDATSOS, modificado hace 11 años.

RE: Clarifications

Regular Member Mensajes: 110 Fecha de incorporación: 4/10/11 Mensajes recientes
For what I know, if you define an entity in service.xml let's say MyEntity and assuming you have put local-service="false" and remote-service="false" a set of files under WEB-INF/service is generated which are all purely autogenerated and non-modifiable. Moreover, under the WEB-INF/src/your-packagepath/model are also created some XXXImpl java classes. Inside each of them, it's stated how they can be used. In a nutshell you can provide additional functionality to your MyEntity references, by adding memeber variables and methods in the MyEntityImpl class. Running ant build-service target will add the corresponding behavior (methods) to your MyEntity interface.

Now if you set local-service="true" in service.xml there's an an analogous effect concerning files under WEB-INF/src/your-packagepath/service where the modifiale classes are the MyEntityLocalServiceImpl, whose methods are essentially added to MyEntityLocalServiceUtil

Likely-wise with remote-service and MyEntityServiceImpl

look at the liferay wiki and blogs related pages for more detailed information. I think what I said is enough to get you up and running some examples of your own.
venka reddy, modificado hace 11 años.

RE: Clarifications

Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi MICHAIL,

Thanks for reply and taking time to explain the scenario. I have gone the through the classes (Service and persistence layers),i feel i am fine with that.

What about the generated xml files(base-spring.xml and cluster-spring.xml ..... etc) ?

Once again thanks for the contribution.
MICHAIL MOUDATSOS, modificado hace 11 años.

RE: Clarifications

Regular Member Mensajes: 110 Fecha de incorporación: 4/10/11 Mensajes recientes
To the best of my knowledge, these are overwritten each time you run the ant build-service target. (Liferay uses Spring for invocation of a number of Service Beans that provide persistence and other utilities, hence the generated Spring and Persistence configuration files). Among other configuration files (listed in portal.properties), I think you can use a file named after: ext-spring.xml in order to override some spring configuration but I'm definitely not the right man to talk about it in detail.
venka reddy, modificado hace 11 años.

RE: Clarifications

Regular Member Mensajes: 231 Fecha de incorporación: 23/03/11 Mensajes recientes
Hi,

Thanks for information. mean while i will dig into the code what is happening behind.

Once again thanks for the information.