hstaudacher / osgi-jax-rs-connector

An OSGi - JAX-RS 2.0 Connector, software repository available on the link below
http://hstaudacher.github.io/osgi-jax-rs-connector
Other
190 stars 98 forks source link

Custom default path for services #151

Closed madhugarimilla closed 8 years ago

madhugarimilla commented 8 years ago

I see the current default path for all services is '/services'. Can we set this to something of our choice?

hstaudacher commented 8 years ago

Check the faq https://github.com/hstaudacher/osgi-jax-rs-connector/wiki/FAQ

madhugarimilla commented 8 years ago

Hi,

I was trying to provide the root like this inside start method of Activator class. Did i miss something? my services are still available under /services.

ServiceReference<?> reference = context.getServiceReference( ConfigurationAdmin.class.getName() ); ConfigurationAdmin configAdmin = ( ConfigurationAdmin )context.getService( reference ); Configuration configuration = configAdmin.getConfiguration( "com.eclipsesource.jaxrs.connector", null ); Dictionary<String, Object> properties = configuration.getProperties(); properties.put( "root", "/rest/v1" ); configuration.update(); context.ungetService( reference );