Fórumok

How to handle shared custom service.jar in lib\ext

Jan Tošovský, módosítva 9 év-val korábban

How to handle shared custom service.jar in lib\ext

Liferay Master Bejegyzések: 566 Csatlakozás dátuma: 2010.07.22. Legújabb bejegyzések
Dear All,

my app can be optionally extended with additional helper apps. All these apps require the base app custom service.jar located in the common lib location, e.g. lib\ext in the tomcat container.

Is there any way how to handle these scenarios?

I don't want to have all apps in one package as the pace of development differs (but the core service will stay same all the time) and I'd like to update it independently.

It is free stuff, so I could eventually ask users politely to copy jar file manually, but I understand it is not very convenient.

Any idea?

Thanks, Jan
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: How to handle shared custom service.jar in lib\ext (Válasz)

Liferay Legend Bejegyzések: 14916 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
The problem with lib/ext solution is that to deploy an update, the app container needs to be restarted.

The problem with the service jar in the plugin's WEB-INF/lib is, of course, the inconvenience of copying the service jar around.

Personally, I'd go for the inconvenience of copying over having to restart the app container.

The real solution - Liferay 7 and the OSGi container; services would be registered and there's no service jar copying to worry about (well, according to them, I'm still waiting to see how I can compile a plugin w/ some declared service interface available at compile time).

The OSGi container is available for 6.2, so it might be something to play around with now if you have 6.2 and some time...
Jan Tošovský, módosítva 9 év-val korábban

RE: How to handle shared custom service.jar in lib\ext

Liferay Master Bejegyzések: 566 Csatlakozás dátuma: 2010.07.22. Legújabb bejegyzések
I forgot to mention my portlet generates social activities and when they need to be interpreted by Activities portlet (in ROOT) it is necessary to place my service in the common place, hence lib\ext. I use also custom indexer.

If I remember correctly, placing custom service.jar into individual plugins caused some clashes. But it could be my fault.

Anyway, OSGi container looks promising. I've thought OSGi is obsolete technology and to be honest, I've never understood what it is all about. An advantage your are talking about is something new to me and maybe I'll give it a try.

Thanks, Jan
Jan Tošovský, módosítva 9 év-val korábban

RE: How to handle shared custom service.jar in lib\ext

Liferay Master Bejegyzések: 566 Csatlakozás dátuma: 2010.07.22. Legújabb bejegyzések
I finally managed to avoid that common service.jar in lib\ext. I revised all the dependencies, revealed the cause of clashes, eliminated them so now both plugins can be deployed without that tweaking. The hardest part was my hook where reflection has to be used.

Great!