As said, I will take a deeper look at it tonight, on the other hand it
runs smoothly within apache karaf.

regards, Achim


2011/1/14 Abhishek Rakshit <[email protected]>:
> Hey Achim,
> Thanks a lot for responding. There is a typo in the code I posted.
> I call a start on the bundle after that.
> //****
> Platform.getBundle("org.ops4j.pax.web.pax-web-jetty-bundle").start();
> //****
> I understand that Pax-Web uses managed configuration and tried doing this
> without stoping and starting the bundle but that too didn't work. My
> question is that am I doing this right?
> Really appreciate your help.
> Regards,
> Abhishek
> On Fri, Jan 14, 2011 at 3:30 AM, Achim Nierbeck <[email protected]>
> wrote:
>>
>> Hi,
>>
>> Just I did just take a quick look at your code, but was the stopping
>> of the jetty-bundle twice your intention?
>> And actually pax-web uses managed configuration, so if you change the
>> port while running it will be reconfigured.
>>
>> I can take a look at it tonight in more detail.
>>
>> Achim
>>
>> 2011/1/13 Abhishek Rakshit <[email protected]>:
>> > Hey Guys,
>> > I am using Pax-Web to run a web service inside eclipse as a plugin.
>> > Pax-Web is working fine and the service starts at port 8080 (default)
>> > correctly.
>> > Now I need to configure this port at runtime and was trying to do this
>> > by
>> > using the Configuration Admin Service by getting the pax web
>> > Configuration
>> > and changing the "org.osgi.service.http.port" property. But this is
>> > having
>> > no effect on the port. I have provided my code snippet below. Could
>> > someone
>> > please point out what I am doing wrong?
>> > //**********************
>> >
>> > Platform.getBundle("org.ops4j.pax.web.pax-web-jetty-bundle").stop();
>> >
>> > Bundle configMgrBundle = Platform.getBundle("org.eclipse.equinox.cm");
>> >
>> > configMgrBundle.start();
>> >
>> > ServiceReference configAdminServiceRef =
>> > context.getServiceReference(ConfigurationAdmin.class.getName());
>> >
>> >      if (configAdminServiceRef != null) {
>> >
>> > ConfigurationAdmin configAdmin = (ConfigurationAdmin)
>> > context.getService(configAdminServiceRef);
>> >
>> > Configuration config =
>> > configAdmin.getConfiguration("org.ops4j.pax.web");
>> >
>> > Dictionary properties = config.getProperties();
>> >
>> > if (properties == null) {
>> >
>> >        properties = new Hashtable();
>> >
>> > }
>> >
>> > properties.put("org.osgi.service.http.port", "8888");
>> >
>> > config.update(properties);
>> >
>> > Platform.getBundle("org.ops4j.pax.web.pax-web-jetty-bundle").stop();
>> >
>> > //**********************
>> >
>> > Really appreciate your help
>> >
>> > Abhishek,
>> >
>> > _______________________________________________
>> > general mailing list
>> > [email protected]
>> > http://lists.ops4j.org/mailman/listinfo/general
>> >
>> >
>
>

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to