Hi all,
 
Sorry it took so long to reply. It isn't a sign of disinterest in
Restlet+OSGi at all, just lack of time due to customer engagements. If you
need timely answers, I recommend that you consider our professional support
plans:
http://www.noelios.com/products/support
 
Ok, enough commercials, let's try to address your issues:
 
1) Due to the merging of the Restlet API and Restlet engine bundles in 1.2
and to the addition of new dependencies (javax.crypto), the manifest was
broken. It did work in Restlet 1.1 last time I tested it (with Equinox).
Anyway, I've just fixed this in SVN trunk and I promise to fix all other
manifest issues reported as soon as possible (patches welcome).
 
2) Regarding connectors, we were able to reimplement our regular classpath
introspection mechanism (looking for "META-INF/services/*Helper" files).
However, due to the refactoring, the Activator wasn't declared anymore
(org.restlet.engine.internal.Activator). This is now fixed as well.
 
3) Also, I've made the "org.mortbay.jetty.ajp" imported package optional in
the "org.restlet.ext.jetty" bundle. That should solve your issue. I have
also upgraded a Jetty bundle to version 6.1.15.
 
4) There is a lack of basic documentation, so I've created a new page in the
user guide, showing a simple "Hello, world!" example as well as a more
complex one with resources and Jetty as the HTTP server:
 
"OSGi deployment"
http://wiki.restlet.org/docs_1.2/13-restlet/48-restlet/238-restlet.html
 
Note that calling "Engine.setUserClassLoader()" isn't necessary in those
cases.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~  <http://www.restlet.org/>
http://www.restlet.org
Noelios Technologies ~ Co-founder ~  <http://www.noelios.com/>
http://www.noelios.com
 

  _____  

De : Rob Heittman [mailto:[email protected]] 
Envoyé : vendredi 27 février 2009 15:58
À : [email protected]
Objet : Re: Restlet and OSGi Issues



Hi again David, 

Thanks again for this post! As you gave me the clue needed to temporarily
get out of a very deep hole with Jetty connector discovery in one of our
OSGi builds. Once I set
Engine.setUserClassLoader(this.getClass().getClassLoader()); in my Equinox
application, I can add the Jetty connector to the dependencies for the
application bundle, and place a
META-INF/services/org.restlet.engine.ServerHelper file in the source tree of
my application bundle to point to Jetty (or programmatically set the Engine,
but for my case it's a better temporary fix to externalize it in the file).
It doesn't make the connector especially pluggable in an OSGi way, but it
gets me out of dodge for today.

I have some ideas for improving this without breaking the core Restlet
model, but will wait for Jerome to weigh in!

- Rob

On Mon, Feb 23, 2009 at 5:40 PM, David Fogel <[email protected]> wrote:


3) How can we get the restlet engine to use, for example, the Jetty
connector, in the OSGI environment? We added the Jetty extension
bundle, as well as the various Jetty bundles, to our environment. But
I can't see any evidence that they're being used. the existing docs
only mention the conventional java jar-scanning technique, which
allows this to happen automatically in non-OSGi environments.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1296553

Reply via email to