Christoph Rabel 6 Years Ago Fantastic post! Very useful.Have you tried subsystems already? A colleague did and it works only till he restarts the server. Than it doesn't come up anymore (forgot the exact error/problem). Please sign in to reply. Reply as... Cancel Iacopo Colonnelli Christoph Rabel 6 Years Ago - Edited Hi Christoph,thank you for your positive feedback.Concerning the Subsystems issue, are you experiencing problems with David's example or with a different esa package? In the first case, I suggest your colleague to add a comment below David's blog post, with the used Liferay version and some details about the error. If you're experiencing a problem with a different subsystem usage, maybe it would be better to open a dedicated thread on Liferay forum. In any case, I need more details to help you Please sign in to reply. Reply as... Cancel
Iacopo Colonnelli Christoph Rabel 6 Years Ago - Edited Hi Christoph,thank you for your positive feedback.Concerning the Subsystems issue, are you experiencing problems with David's example or with a different esa package? In the first case, I suggest your colleague to add a comment below David's blog post, with the used Liferay version and some details about the error. If you're experiencing a problem with a different subsystem usage, maybe it would be better to open a dedicated thread on Liferay forum. In any case, I need more details to help you Please sign in to reply. Reply as... Cancel
Krzysztof Gołębiowski 6 Years Ago Very useful post! I don't know yet if I'm going to use Blueprint (however this approach is quite interesting), but every new peek under the hood of new Liferay 7/DXP from a different perspective is worth a lot! Please sign in to reply. Reply as... Cancel
Ray Augé 5 Years Ago This statement is not quite accurate:> Again, this solution DOESN'T WORK, because since fragments do not reach the Active state, their services are not started.It doesn't really have anything to do with the fact that fragments only become resolved. Since the code of the fragment is on the classpath of the host bundle, as long as there is something to trigger the code, it will execute, including services.The reason this doesn't work with DS is because DS requires the header `Service-Component` to provide a list (or glob) of the component descriptors to process. This list is typically created during build time. In OSGi this is called an OPT-IN mechanism (pretty much everything in OSGi is OPT-IN in order to have strong metadata).Secondly, since the `Service-Component` header is not adopted by the host (you might say cannot be overridden a fragment; only a few bundle headers behave this way) that makes putting DS components in a fragment a little pointless.However, if the host bundle had already been created with `Service-Component: OSGI-INF/*.xml` (i.e. with a glob that matches a collection of zip entries) then adding components in a fragment would work fine because these entries could be from fragments (and their classes too).So it's not that blueprint is magic in this regard. It's OPT-IN mechanism is simply designed in such a way as to allow for the bean descriptors from fragments to be read by the extender. Please sign in to reply. Reply as... Cancel Iacopo Colonnelli Ray Augé 5 Years Ago Hi Ray,thank you very much for your clarification.I updated the original article ^_^ Please sign in to reply. Reply as... Cancel
Iacopo Colonnelli Ray Augé 5 Years Ago Hi Ray,thank you very much for your clarification.I updated the original article ^_^ Please sign in to reply. Reply as... Cancel
Ray Augé 5 Years Ago BTW, if you go back to the thread about Aries Proxy 1.1+ I posted a solution to the problem there. Please sign in to reply. Reply as... Cancel Iacopo Colonnelli Ray Augé 5 Years Ago Hi again Ray,I updated the comment about Aries Proxy in the original post. Moreover, I added the Aries Util bundle, that is necessary to correctly resolve Aries Proxy module (I forgot to include it on Github repo).Thank you for your comment, because I searched for more details and I discovered the OSGi Weaving Hook specification, that looks quite interesting ^_^ Please sign in to reply. Reply as... Cancel
Iacopo Colonnelli Ray Augé 5 Years Ago Hi again Ray,I updated the comment about Aries Proxy in the original post. Moreover, I added the Aries Util bundle, that is necessary to correctly resolve Aries Proxy module (I forgot to include it on Github repo).Thank you for your comment, because I searched for more details and I discovered the OSGi Weaving Hook specification, that looks quite interesting ^_^ Please sign in to reply. Reply as... Cancel
Narsingh Pal 4 Years Ago Hi Iacopo, Can we also override non-component classes ? Basically I want to modify implementation of one of the methods of PipingServletResponse present in the util-taglib. of Liferay 7.1 DXP For this I created a fragment bundle Fragment-Host: com.liferay.util.taglib;bundle-version="3.4.5" The method is never invoked, possibly because like you mentioned "fragments cannot override host resources, because host context is searched before fragment context". Therefore, I created "blueprint.xml" file in "\resources\OSGI-INF\blueprint" the fragment bundle. Below is the entry in the blueprint.xml file <? xml version= "1.0" encoding= "UTF-8" ?> <blueprint xmlns= "http://www.osgi.org/xmlns/blueprint/v1.0.0"> <bean class= "com.liferay.taglib.servlet.PipingServletResponse" id= "com.liferay.taglib.servlet.PipingServletResponse" /> </blueprint> But still, the method is not invoked, instead the method from the original taglib is getting invoked. Wanted to know if I am missing something here ? Thanks and Regards Narsingh Pal Please sign in to reply. Reply as... Cancel