Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Bart Simpson
Using EXT plugin extend or provide the same fully qualified name of class?
19 de julio de 2012 5:44
Respuesta

Bart Simpson

Ranking: Liferay Master

Mensajes: 523

Fecha de incorporación: 29 de agosto de 2011

Mensajes recientes

Trying to understand EXT plugin , how it works. Is it a better idea to Extend the class that I want to change or I have to provide the same fully qualified class name. In the second case, does it not rely on classloader loading in some order which is high risk, in case it it doesn't load the class the in the correct order?
Hitoshi Ozawa
RE: Using EXT plugin extend or provide the same fully qualified name of cla
19 de julio de 2012 5:51
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7990

Fecha de incorporación: 23 de marzo de 2010

Mensajes recientes

Ext plugin actually overwrite files when it is deployed. Information of ext plugin is available from the following page:

http://www.liferay.com/community/wiki/-/wiki/Main/Ext+Plugin
Bart Simpson
RE: Using EXT plugin extend or provide the same fully qualified name of cla
19 de julio de 2012 6:34
Respuesta

Bart Simpson

Ranking: Liferay Master

Mensajes: 523

Fecha de incorporación: 29 de agosto de 2011

Mensajes recientes

Hitoshi,

Thanks for the quick reply. I have gone through the documentation, but looking for some more underlying details. How in a class would overwrite another ? Can it be relied through classloader? the order of loading the same named class, just being in different jar? So there may be cases where the order of loading doesn't actually achieve what is expected? especially in linux environment. for instance, in here : http://www.liferay.com/community/forums/-/message_boards/message/341892
If it doesn't work, try to remove all JAR files from WEB-INF/lib, then first of all copy ext-impl.jar, then copy all rest JAR files. It works for me on CentOS, SUSE, and RedHat; using Tomcat. ext-impl.jar must be physically located before portal-impl.jar.


Is that the only / right way of ensuring it?
Bart Simpson
RE: Using EXT plugin extend or provide the same fully qualified name of cla
23 de julio de 2012 0:11
Respuesta

Bart Simpson

Ranking: Liferay Master

Mensajes: 523

Fecha de incorporación: 29 de agosto de 2011

Mensajes recientes

Any more details?
Bart Simpson
RE: Using EXT plugin extend or provide the same fully qualified name of cla
25 de julio de 2012 23:58
Respuesta

Bart Simpson

Ranking: Liferay Master

Mensajes: 523

Fecha de incorporación: 29 de agosto de 2011

Mensajes recientes

If anyone is interested in how it works, I checked and it classloader loads the jar files in alphabetical order. So that "ext-" jar file in portal's lib is always before "portal-" files and those are loaded, the classloader then ignores the same classes (in portal-) as they are already loaded from ext-