Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » Setting endpoint URL context - JAX-RS, Jersey, Jetty(A "1" is being appended to the URI definition which I want to replace)
Setting endpoint URL context - JAX-RS, Jersey, Jetty [message #1793090] Tue, 31 July 2018 03:21
Eclipse UserFriend
There is a "1" being appended to the Jetty context definition. I don't know where that is coming from and I'd like to replace it with a context name of my choice. As it stands, I have to enter:
http://localhost:8080/1/helloworld/hello
to access my service.

I'm on Photon, with the following ECF bundles installed:
ECF Remote Services Examples Developer Resources	1.0.100.v20180502-2137	
    ECF Distributed EventAdmin Examples Developer Resources	1.0.100.v20180302-1843
    ECF Remote Services Examples Developer Resources	1.5.100.v20180502-2137

ECF Remote Services SDK	3.14.0.v20180518-0149
    ECF Discovery	1.0.100.v20180306-0211
    ECF Discovery SLP (RFC 2608) Provider	1.0.0.v20180426-1936
    ECF Discovery Zeroconf Provider	1.0.0.v20180306-0429
    ECF Discovery Zookeeper Provider	1.0.0.v20180302-2006
    ECF Distributed EventAdmin	2.0.100.v20180426-2032
    ECF Generic Provider Feature	1.0.100.v20180402-2103
    ECF Generic Provider RemoteService Feature	1.1.100.v20180516-2213
    ECF Generic Server	1.1.100.v20180302-2006	
    ECF Remote Services	2.5.0.v20180409-2248
    ECF Remote Services Admin	2.3.1.v20180518-0149
    ECF Remote Services R-OSGi Provider	1.1.0.v20180516-2213
    ECF Remote Services REST Support	1.0.100.v20180302-2006
    ECF Remote Services Servlet API Feature	1.0.100.v20180302-2006
    ECF SharedObject Feature	1.0.100.v20180404-2345
 ECF Remote Services SDK Developer Resources	3.14.0.v20180518-0149
    ECF Discovery Developer Resources	1.0.100.v20180306-0211
    ECF Discovery SLP (RFC 2608) Provider Developer Resources	1.0.0.v20180426-1936
    ECF Discovery Zeroconf Provider Developer Resources	1.0.0.v20180306-0429
    ECF Discovery Zookeeper Provider Developer Resources	1.0.0.v20180302-2006
    ECF Distributed EventAdmin Developer Resources	2.0.100.v20180426-2032
    ECF Generic Provider Feature Developer Resources	1.0.100.v20180402-2103	
    ECF Generic Provider RemoteService Feature Developer Resources	1.1.100.v20180516-2213
    ECF Generic Server Developer Resources	1.1.100.v20180302-2006	
    ECF Remote Services Admin Developer Resources	2.3.1.v20180518-0149
    ECF Remote Services Developer Resources	2.5.0.v20180409-2248
    ECF Remote Services R-OSGi Provider Developer Resources	1.1.0.v20180516-2213
    ECF Remote Services REST Support Developer Resources	1.0.100.v20180302-2006
    ECF Remote Services Servlet API Feature Developer Resources	1.0.100.v20180302-2006
    ECF SharedObject Feature Developer Resources	1.0.100.v20180404-2345
ECF SDK for Eclipse	3.14.0.v20180302-2126
    ECF Remote Services Examples	1.0.100.v20180502-2137
ECF SDK for Eclipse Developer Resources	3.14.0.v20180302-2126


My configuration file looks like this:

# Required OSGi Remote Service Property indicating that the StudentService should
# be exported
service.exported.interfaces=*
service.intents=osgi.async
# this one surprises me - ??
service.intents=jaxrs

# Optional OSGi Remote Service Property indicating that the ecf.jaxrs.jersey.server
# distribution provider should be used to export this service
service.exported.configs=ecf.jaxrs.jersey.server

# Distribution-provider property defining the alias prefix for the Jersey server
ecf.jaxrs.jersey.server.alias=/jersey

# this one I got from reading the code - it does change the separator
ecf.jaxrs.jersey.server.pathPrefix=/

# this seems to do nothing
ecf.jaxrs.jersey.server.urlPrefix=/server

# Other Jersey properties that could be defined
# got this one from reading code - it seems to do nothing
ecf.jaxrs.jersey.server.urlContext=/urlctx

# I think this might be a spelling mistake in the examples?
osgi.basic.timeoute=50000


However, the resulting exported registration looks as follows - notice the URL: http://localhost:8080/1

My question is - how to replace the "1" with a context of my choice?

19:10:08.955;EXPORT_REGISTRATION;exportedSR={com.dsct.test.jaxrs.IHelloWorld}={service.intents=jaxrs, service.exported.configs=ecf.jaxrs.jersey.server, ecf.jaxrs.jersey.server.alias=/jersey, service.id=37, service.bundleid=2, service.scope=bundle, ecf.jaxrs.jersey.server.urlPrefix=/server, ecf.jaxrs.jersey.server.urlContext=/urlctx, ecf.jaxrs.jersey.server.pathPrefix=/, component.name=com.dsct.test.jaxrs.HelloWorldImpl, service.exported.interfaces=*, component.id=2, osgi.basic.timeoute=50000};cID=URIID [uri=http://localhost:8080/1]; rsId=1
--Endpoint Description---
<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
  <endpoint-description>
    <property name="ecf.endpoint.id" value-type="String" value="http://localhost:8080/1"/>
    <property name="ecf.endpoint.id.ns" value-type="String" value="ecf.namespace.jaxrs"/>
    <property name="ecf.endpoint.ts" value-type="Long" value="1533003003466"/>
    <property name="ecf.jaxrs.jersey.server.alias" value-type="String" value="/jersey"/>
    <property name="ecf.jaxrs.jersey.server.pathPrefix" value-type="String" value="/"/>
    <property name="ecf.jaxrs.jersey.server.urlContext" value-type="String" value="/urlctx"/>
    <property name="ecf.jaxrs.jersey.server.urlPrefix" value-type="String" value="/server"/>
    <property name="ecf.rsvc.id" value-type="Long" value="1"/>
    <property name="endpoint.framework.uuid" value-type="String" value="f083dcba-3d98-4a20-8643-d340bb28f4d3"/>
    <property name="endpoint.id" value-type="String" value="636bdd3b-db26-41ec-af53-735ccad02385"/>
    <property name="endpoint.service.id" value-type="Long" value="37"/>
    <property name="objectClass" value-type="String">
      <array>
        <value>com.dsct.test.jaxrs.IHelloWorld</value>
      </array>
    </property>
    <property name="osgi.basic.timeoute" value-type="String" value="50000"/>
    <property name="remote.configs.supported" value-type="String">
      <array>
        <value>ecf.jaxrs.jersey.server</value>
      </array>
    </property>
    <property name="remote.intents.supported" value-type="String">
      <array>
        <value>passByValue</value>
        <value>exactlyOnce</value>
        <value>ordered</value>
        <value>osgi.async</value>
        <value>osgi.private</value>
        <value>osgi.confidential</value>
        <value>jaxrs</value>
      </array>
    </property>
    <property name="service.imported" value-type="String" value="true"/>
    <property name="service.imported.configs" value-type="String">
      <array>
        <value>ecf.jaxrs.jersey.server</value>
      </array>
    </property>
    <property name="service.intents" value-type="String" value="jaxrs"/>
  </endpoint-description>
</endpoint-descriptions>
---End Endpoint Description


Any help appreciated. I'm an ECF noobe so this may be a trivial question but I've spent hours trying to find docs or a combo of properties that work.
Previous Topic:Bug 219368 - Indefinite hang on HTTP connection to unresponsive site - back again
Next Topic:Setting endpoint URL context - JAX-RS, Jersey, Jetty
Goto Forum:
  


Current Time: Thu Apr 18 00:07:52 GMT 2024

Powered by FUDForum. Page generated in 0.02511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top