rotty3000/liferay-portal — pull request #58 by migue (2012-06-08 04:55:02+00:00)
Title: LPS-13704 WIP

Hey Ray,

This is the work in progress that I am doing currently; I have restarted my work on it this night because I had to spent too many time on scalations, bugs, testing infrastructure, . . .

I have been testing it and everything is fine but we have to solve some problems I think we could have:

- I need to disable the management of required deployment contexts when we are using the OSGI base approach (the Required-Bundle attribute will take care of it). While we are keeping both approaches we need to do it temporarily (it is not a real problem, just need to do it)

- We could have some "splitting package" issues at some point. Let me show it with an example: the portal bundle is exporting __com.liferay.mail.service__ and the mail portlet is exporting the same package. During the bundle resolution the __OSGI framework__ will resolve a bundle exporting this package (for example, the system bundle). When the plugin will be deployed, it could get a ClassCastNotFoundException because some of the classes are not offered by the system bundle but they are in the mail bundle (as, for example, the ClpSerializer). I need to test it but I think this could occur at some place.

- We are generating the _Web Bundle_ by the introspection process. Everything should work fine except the situation where a class is __no referenced__ from the plugin but it is executed from the plugin classloader. Let me make another example where I think we could find this kind of problem. Let's supose for a moment we are deploying a plugin which need to register the schedulers (__PortletBagFactory.initScheduler__). It will try to load the __PortletProps__ class using the plugin classloader but this class will not be found altough it is being exported by the util-java bundle because the instrospection process is no able to infer that this class will be used by the portlet.

So this are some important things I think we need to fix (I need to test them deeper but I think both could happend). Should we include all this kind of things inside this subtask or do we create a different subtask??

Cheers,

Migue

(I am doing testing on Tomcat and JBoss in order to find as much as problems as soon as possible :) )