Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
Riccardo Ferrari
How to integrate service - best practice?
11 de Outubro de 2011 06:28
Resposta

Riccardo Ferrari

Ranking: Regular Member

Mensagens: 137

Data de entrada: 13 de Novembro de 2010

Mensagens 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
RE: How to integrate service - best pracice?
11 de Outubro de 2011 05:03
Resposta

Kavita Gupta

Ranking: Junior Member

Mensagens: 64

Data de entrada: 12 de Março de 2008

Mensagens recentes

Hi,

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

Regards,
Kavita
Riccardo Ferrari
RE: How to integrate service - best pracice?
11 de Outubro de 2011 06:35
Resposta

Riccardo Ferrari

Ranking: Regular Member

Mensagens: 137

Data de entrada: 13 de Novembro de 2010

Mensagens 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
Tom Mahy
RE: How to integrate service - best pracice?
11 de Outubro de 2011 07:42
Resposta

Tom Mahy

Ranking: Regular Member

Mensagens: 103

Data de entrada: 11 de Maio de 2011

Mensagens 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
Riccardo Ferrari
RE: How to integrate service - best pracice?
12 de Outubro de 2011 06:47
Resposta

Riccardo Ferrari

Ranking: Regular Member

Mensagens: 137

Data de entrada: 13 de Novembro de 2010

Mensagens recentes

Thanks!

This is an interesting way to overcame the reboot issue.

I will investigate it ...