Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
Manish Kumar Jaiswal
26 settembre 2012 1.33

Manish Kumar Jaiswal

Punteggio: Regular Member

Messaggi: 144

Data di Iscrizione: 25 novembre 2008

Messaggi recenti

Is it a good idea to make a big service.xml having lot of entities or its better we should break it into multiple smaller service.xml .Of-course all entities are not completely related .

Jignesh Vachhani
RE: Service.xml
26 settembre 2012 6.00

Jignesh Vachhani

Punteggio: Liferay Master

Messaggi: 801

Data di Iscrizione: 10 marzo 2008

Messaggi recenti

Depends on your requirement.
if module is completely separate then I would prefer you to create seprate service.xml.
which can help to build with less building time and can not have lengthy code under single package.
And if you want to reuse service of one portlet to another then better you make it under single service.xml file so that you can easily access services vice-versa.
That's my observation during my development phase.
David H Nebinger
RE: Service.xml
26 settembre 2012 5.51

David H Nebinger

Community Moderator

Punteggio: Liferay Legend

Messaggi: 13216

Data di Iscrizione: 1 settembre 2006

Messaggi recenti


What he's talking about is one service.xml that imports the stub service.xml files; end result is the same, one plugin with all of the services contained.

That said, we ran into some issues using separate service.xml files under the 6.0 series and reverted back to a single service.xml The single file is large and takes awhile to build the services for, but it works. Do yourself a favor and document it as you would any java source file, as comments always come in handy later on.

If the separate service.xml option was working, I definitely would have gone down that road. Allows the entities to be grouped together based upon function and would keep the file sizes manageable.

So I'd say go that route, but test it out and ensure it works before getting too far down the rabbit hole...

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!