Foren

How to integrate service - best practice?

thumbnail
Riccardo Ferrari, geändert vor 12 Jahren.

How to integrate service - best practice?

Regular Member Beiträge: 139 Beitrittsdatum: 13.11.10 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: How to integrate service - best pracice?

Junior Member Beiträge: 64 Beitrittsdatum: 12.03.08 Neueste Beiträge
Hi,

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

Regards,
Kavita
thumbnail
Riccardo Ferrari, geändert vor 12 Jahren.

RE: How to integrate service - best pracice?

Regular Member Beiträge: 139 Beitrittsdatum: 13.11.10 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: How to integrate service - best pracice?

Regular Member Beiträge: 103 Beitrittsdatum: 11.05.11 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: How to integrate service - best pracice?

Regular Member Beiträge: 139 Beitrittsdatum: 13.11.10 Neueste Beiträge
Thanks!

This is an interesting way to overcame the reboot issue.

I will investigate it ...