Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Manish Kumar Jaiswal
Service.xml
26 settembre 2012 1.33
Risposta

Manish Kumar Jaiswal

Punteggio: Regular Member

Messaggi: 133

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 .

Regards
Manish
Jignesh Vachhani
RE: Service.xml
26 settembre 2012 6.00
Risposta

Jignesh Vachhani

Punteggio: Liferay Master

Messaggi: 794

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
Risposta

David H Nebinger

Community Moderator

Punteggio: Liferay Legend

Messaggi: 11771

Data di Iscrizione: 1 settembre 2006

Messaggi recenti

Wrong.

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...