Foros de discusión

Difference between UserServiceUtil and UserLocalServiceUtil?

IGC SA, modificado hace 12 años.

Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Mensajes: 80 Fecha de incorporación: 8/06/11 Mensajes recientes
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 hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Expert Mensajes: 416 Fecha de incorporación: 15/05/07 Mensajes recientes
Hi IGC

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

Regards
IGC SA, modificado hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Mensajes: 80 Fecha de incorporación: 8/06/11 Mensajes recientes
Thank you for the fast answer emoticon
Tim FoX, modificado hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Mensajes: 34 Fecha de incorporación: 2/03/10 Mensajes recientes
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 hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Mensajes: 80 Fecha de incorporación: 8/06/11 Mensajes recientes
Good to know that, thanks.
thumbnail
David García González, modificado hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Regular Member Mensajes: 127 Fecha de incorporación: 14/07/09 Mensajes recientes
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 hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Mensajes: 80 Fecha de incorporación: 8/06/11 Mensajes recientes
OK, thanks emoticon
thumbnail
M. Garcia, modificado hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Regular Member Mensajes: 107 Fecha de incorporación: 17/05/11 Mensajes recientes
Does this mean that developping a portlet, one should only use the Local classes ?
thumbnail
Satish Anupoju, modificado hace 12 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

Junior Member Mensajes: 79 Fecha de incorporación: 20/02/11 Mensajes recientes
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 hace 9 años.

RE: Difference between UserServiceUtil and UserLocalServiceUtil?

New Member Mensajes: 10 Fecha de incorporación: 13/07/14 Mensajes recientes
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.