Looks nice! Maybe there should be a way to avoid using exceptions to control whether we load a class from classpath or from OSGi. For the best of my knowledge throwing exceptions are time consuming due to the creation of the stack trace. I searched for an alternative when we started talking about it a few days ago, but I could not find anything.
On Fri, Apr 20, 2012 at 9:06 AM, Jörn Kottmann <[email protected]> wrote: > I worked a bit on this yesterday night, and committed my results > this morning, please have a look and comment. > > The OSGi things still need to be finished and tested. I am not > yet sure what is the best way to select a specific OSGi service. > A user could register multiple, looks like we need to perform > filtering additional values in the dictionary of the services. > > There is also a short test which shows how it could be used. > The code throws a runtime exception if the extension loading > fails. Its an interesting question on how this should be solved. > > Jörn > > > On 04/19/2012 06:12 AM, James Kosin wrote: > >> On 4/13/2012 8:57 AM, Jörn Kottmann wrote: >> >>> On 04/13/2012 02:08 PM, [email protected] wrote: >>> >>>> Do you have any sample code of how to do it? Maybe we could create a >>>> utility class with a method that does as you explained before: try to >>>> load >>>> a class using Class.forName and if it fails it tries loading from OSGi. >>>> >>> No, I don't have any code yet, only some thoughts about how it >>> should be done. >>> >>> +1 for the util method. >>> >>> Jörn >>> >>> >>> >>> Jorn& William, >> >> >> May want to look at this project... >> http://geronimo.apache.org/ >> >> James >> > >
