Fórum

How to integrate service - best practice?

thumbnail
Riccardo Ferrari, modificado 12 Anos atrás.

How to integrate service - best practice?

Regular Member Postagens: 139 Data de Entrada: 13/11/10 Postagens Recentes
Hello everybody,

I developed a service that allow email sending taking emails templates from web contents. It's quite flexible and easy that it would be nice to use it with all my portlets across the entire portal an communities(yes lots of my portlets does send email to users or admins).

How do I inject the service into the portal?
I mean should I build a jar, put it into tomcat lib (lib/ext) folder and restart the server?
Or
Can I deploy it as a simple portlet and hack some way the class loader to inject my service? (This would allow ease the maintenance/upgrade process, because of the hot deploy feature)

Could this be achieved out of the EXT environment?

Thanks in advance
Kavita Gupta, modificado 12 Anos atrás.

RE: How to integrate service - best pracice?

Junior Member Postagens: 64 Data de Entrada: 12/03/08 Postagens Recentes
Hi,

You can put service jar into tomcat lib/ext so that it is accessible by all other portlet.

Regards,
Kavita
thumbnail
Riccardo Ferrari, modificado 12 Anos atrás.

RE: How to integrate service - best pracice?

Regular Member Postagens: 139 Data de Entrada: 13/11/10 Postagens Recentes
Thank you for your reply,

the first solution proposed (the one you pointed me) has the drawback that force me to reboot the server any time I upgrade the service. It would be nice to have the freedom to upgrade the service without requiring to reboot.

regards
thumbnail
Tom Mahy, modificado 12 Anos atrás.

RE: How to integrate service - best pracice?

Regular Member Postagens: 103 Data de Entrada: 11/05/11 Postagens Recentes
If you have the liferay IDE its really easy.

create a portlet
http://www.liferay.com/community/wiki/-/wiki/Main/Liferay+IDE+Getting+Started+Tutorial

Then right click the project --> new --> liferay service builder.
You can now deploy your portlet as usual and your service will too.

You can then make the service remote accessible (soap).

Regards,
Tom Mahy
thumbnail
Riccardo Ferrari, modificado 12 Anos atrás.

RE: How to integrate service - best pracice?

Regular Member Postagens: 139 Data de Entrada: 13/11/10 Postagens Recentes
Thanks!

This is an interesting way to overcame the reboot issue.

I will investigate it ...