Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Declarative service in jetty 7.2.2

Thanks Henrik for blogging about your approach.
It looks good to me.
Regarding the configuration of jetty, I apologize for the lack of
updates of the eclipse wiki and indeed your blog is the most
exhaustive source so far.
To start and configure jetty I usually define the system property on
the command-line: -Djetty.home=a/path/to/jettyhome or
-Djetty.home.bundle=symbolic.name.of.bundle.with.a.jetty.config

The reason why we don't configure the jetty.osgi.boot bundle to
configure and start a jettty server is that projects should be in
control of when they want to start jetty.

I use p2 from PDE's target platform or directly p2-director on the
command-line to assemble the jetty-osgi distributions so I don't
usually need to worry about the exact set of jetty jars to download.
If you manually put together the jetty jars, maybe the jetty-server
aggregate will suit your need:
Here are the jetty dependencies that are placed in that one:
http://repo2.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all-server/7.3.0.v20110203/jetty-all-server-7.3.0.v20110203.pom

I must say that there is a critical bug in the OSGi manifest for that aggregate.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337337
It is fixed in 7.3.1
Let me know if you want me to provide a patched 7.3.0 for that aggregate.

Cheers,
Hugues

On Wed, Feb 16, 2011 at 9:27 PM, Henrik Gustafsson
<henrik.gustafsson@xxxxxxxx> wrote:
>
> On Feb 16, 2011, at 13:05 , Mitul Adhia wrote:
>
>> HI All,
>>
>> Was trying out the example which is mentioned in blog http://blog.fnord.se/journal/2011/1/26/deploying-a-servlet-in-jetty-7-using-osgi-ds.html?lastPage=true#comment11939684.
>> This to register the servlet in Jetty 7.2.2 using declarative service approach . Had updated the blog with the technical issues which i am facing .
>>
>> Can anyone help me to solve the issue?. Do let me know if more inputs are required .
>
> I hope so :)
>
> You need to ensure you have started the jetty-osgi-boot bundle, and that you have a proper jetty.xml file it can find. The jetty-osgi-boot bundle is what loads the config, starts the server and starts looking for the exposed services so you don't have to start it programmatically.
>
> I wrote a walkthrough, but it got a bit long, so I posted a it at http://blog.fnord.se/journal/2011/2/16/starting-and-configuring-a-jetty-7-instance-in-equinox.html . It's mostly a brain-dump though, and will probably contain some bugs. It might help you get started though (improvement suggestions are welcome!).
>
> // Henrik
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>


Back to the top