Fórum

Difference between UserServiceUtil and UserLocalServiceUtil?

IGC SA, modificado 12 Anos atrás.

Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Postagens: 80 Data de Entrada: 08/06/11 Postagens Recentes
Hi, this is maybe a newbie question but I'm really wondering what's the difference between those two classes: UserServiceUtil and UserLocalServiceUtil. I'm doing things with users from my portlet and I don't wanna mess it up by using the wrong class.
I've seen other classes that are also duplicated with the -Local- word, for example PortalService and PortalLocalService
and I guess it means something and does something different.

Thank you in advance.
thumbnail
Aritz Galdos, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Expert Postagens: 416 Data de Entrada: 15/05/07 Postagens Recentes
Hi IGC

Basically, the difference is that *ServiceUtil checks permissions and *LocalServiceUtil does not.

Regards
IGC SA, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Postagens: 80 Data de Entrada: 08/06/11 Postagens Recentes
Thank you for the fast answer emoticon
Tim FoX, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Postagens: 34 Data de Entrada: 02/03/10 Postagens Recentes
You can only use the UserLocalServiceUtil from the same VM; the UserServiceUtil is for remote calls and thus adds the extra permission checking.
IGC SA, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Postagens: 80 Data de Entrada: 08/06/11 Postagens Recentes
Good to know that, thanks.
thumbnail
David García González, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Regular Member Postagens: 127 Data de Entrada: 14/07/09 Postagens Recentes
You use UserServiceUtil for remote calls (as a web service) and UserLocalServiceUtil for calls inside the same VM. If you want, you can disable the generation of the remote methods in the service builder with the parameter local-service="true" remote-service="false"
IGC SA, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Postagens: 80 Data de Entrada: 08/06/11 Postagens Recentes
OK, thanks emoticon
thumbnail
M. Garcia, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Regular Member Postagens: 107 Data de Entrada: 17/05/11 Postagens Recentes
Does this mean that developping a portlet, one should only use the Local classes ?
thumbnail
Satish Anupoju, modificado 12 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Postagens: 79 Data de Entrada: 20/02/11 Postagens Recentes
Hi All

I am newbee to Liferay. Can we use UserServiceUtill for all the cases(for the both Local and Remote operations). It leads any performance issue.


Regards
Satish Babu
krishna rao, modificado 9 Anos atrás.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

New Member Postagens: 10 Data de Entrada: 13/07/14 Postagens Recentes
As per standard use UserLocalServiceUtil for applications deployed by portlet plugin. I you want to access via soap services then use UserServiceUtli.

As you said you can still go ahead and use UserServiceUtil for both local and remote services but it will do an extra check for permissions which will down grade your performance.