Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [net4j] Configuring the HTTP Acceptor
[net4j] Configuring the HTTP Acceptor [message #632674] Wed, 13 October 2010 20:33 Go to next message
dloose  is currently offline dloose Friend
Messages: 5
Registered: August 2010
Junior Member
Are there any examples for configuring the CDO server's HTTP Acceptor? I can get the TCP acceptor to work, but the project I'm working on requires all traffic go over HTTP.

My cdo-server.xml config file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>

  <acceptor type="http" listenAddr="0.0.0.0" port="8080"/> 

<!--    
  <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
-->
    <!-- <negotiator type="challenge" description="_database/repo1.users"/> -->
<!--      
  </acceptor>
-->
  
  <repository name="repo1">
  <!-- <property name="overrideUUID" value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/> -->
  <property name="supportingAudits" value="true" />
  <property name="supportingBranches" value="true" />

  <!-- <userManager type="file" description="_database/repo1.users"/> -->

  <store type="db">
   ...
I added the listenAddr and port attributes to the http acceptor element out of desperation. I get the same results without them. If I comment out the http acceptor and enable the tcp acceptor, everything works perfectly.

Here's the output of ss:
Framework is launched.

id	State       Bundle
0	ACTIVE      org.eclipse.osgi_3.6.0.v20100517
	            Fragments=45
1	RESOLVED    c3p0_1.0.0
2	<<LAZY>>    org.apache.derby_10.5.1.1_201005192117
3	RESOLVED    com.my.companys.bundle_1.0.0
4	ACTIVE      org.eclipse.emf.ecore_2.6.0.v20100614-1136
5	RESOLVED    org.eclipse.equinox.launcher_1.1.0.v20100507
	            Fragments=44
6	RESOLVED    javax.xml_1.3.4.v201005080400
7	ACTIVE      org.eclipse.core.contenttype_3.4.100.v20100505-1235
8	ACTIVE      org.eclipse.equinox.app_1.3.0.v20100512
9	RESOLVED    org.eclipse.core.filesystem.win32.x86_1.1.200.v20100505-1235
	            Master=51
10	ACTIVE      org.eclipse.net4j.http.common_3.0.0.v20100614-1656
11	RESOLVED    org.apache.commons.codec_1.3.0.v20100518-1140
12	ACTIVE      org.eclipse.core.resources_3.6.0.v20100526-0737
	            Fragments=38
13	<<LAZY>>    org.eclipse.net4j.db.derby_3.0.0.v20100614-1655
14	ACTIVE      org.eclipse.emf.ecore.xmi_2.5.0.v20100521-1846
15	ACTIVE      org.eclipse.net4j.db_3.0.0.v20100614-1654
	            Fragments=16
16	RESOLVED    net4j-frag_1.0.0.qualifier
	            Master=15
17	ACTIVE      org.eclipse.core.jobs_3.5.0.v20100515
18	ACTIVE      org.eclipse.equinox.preferences_3.3.0.v20100503
19	<<LAZY>>    org.eclipse.team.core_3.5.100.I20100527-0800
20	<<LAZY>>    org.eclipse.core.variables_3.2.400.v20100505
21	ACTIVE      org.eclipse.equinox.common_3.6.0.v20100503
22	ACTIVE      org.eclipse.net4j.http.server_3.0.0.v20100614-1655
23	ACTIVE      org.eclipse.update.configurator_3.3.100.v20100512
24	<<LAZY>>    org.eclipse.core.expressions_3.4.200.v20100505
25	RESOLVED    jtds_1.0.0
26	RESOLVED    org.apache.commons.httpclient_3.1.0.v201005080502
27	ACTIVE      org.eclipse.emf.cdo_3.0.0.v20100614-1657
28	<<LAZY>>    org.eclipse.ant.core_3.2.200.v20100427
29	RESOLVED    org.eclipse.core.runtime.compatibility.registry_3.3.0.v20100520
	            Master=39
30	ACTIVE      org.eclipse.net4j_3.0.0.v20100614-1655
31	ACTIVE      org.eclipse.equinox.http.registry_1.1.0.v20100503
32	ACTIVE      org.eclipse.emf.common_2.6.0.v20100614-1136
33	ACTIVE      org.eclipse.core.runtime.compatibility.auth_3.2.200.v20100517
34	ACTIVE      org.eclipse.emf.cdo.common_3.0.0.v20100614-1655
35	RESOLVED    com.springsource.javax.servlet_2.5.0
36	RESOLVED    org.eclipse.osgi.services_3.2.100.v20100503
37	RESOLVED    org.apache.commons.logging_1.1.1.v201005080502
38	RESOLVED    org.eclipse.core.resources.win32.x86_3.5.100.v20100505-1345
	            Master=12
39	ACTIVE      org.eclipse.equinox.registry_3.5.0.v20100503
	            Fragments=29
40	ACTIVE      org.eclipse.net4j.tcp_3.0.0.v20100614-1656
41	ACTIVE      org.eclipse.emf.cdo.server_3.0.0.v20100614-1654
42	RESOLVED    org.eclipse.osgi.util_3.2.100.v20100503
43	ACTIVE      org.eclipse.net4j.http_3.0.0.v20100614-1655
44	RESOLVED    org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
	            Master=5
45	RESOLVED    javax.transaction_1.1.1.v201006150915
	            Master=0
46	<<LAZY>>    org.eclipse.emf.ecore.change_2.5.0.v20100521-1846
47	ACTIVE      org.eclipse.core.runtime_3.6.0.v20100505
48	ACTIVE      org.eclipse.net4j.util_3.0.0.v20100614-1655
49	ACTIVE      org.eclipse.emf.cdo.server.db_3.0.0.v20100614-1654
50	RESOLVED    javax.servlet_2.5.0.v200910301333
51	ACTIVE      org.eclipse.core.filesystem_1.3.0.v20100526-0737
	            Fragments=9


Any documentation on the HTTP acceptor would be helpful. Specifically, I'd like to know if it supports HTTPS or if it will in the future.

Thanks,
Dave

Re: [net4j] Configuring the HTTP Acceptor [message #632857 is a reply to message #632674] Thu, 14 October 2010 13:47 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5590
Registered: July 2009
Senior Member
Hi,

My impression is that the HTTP transaport of Net4j is rarely used up to now and there's not much of a documentation for it. Please have a look at org.eclipse.net4j.http.internal.server.HTTPAcceptor to find out about the needed properties. I'll be back to business next week and maybe have the time to give more detailed advice then.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 13.10.2010 22:33, schrieb dloose:
> Are there any examples for configuring the CDO server's HTTP Acceptor? I can get the TCP acceptor to work, but the project I'm working on requires all traffic go over HTTP.
> My cdo-server.xml config file looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
>
> <acceptor type="http" listenAddr="0.0.0.0" port="8080"/>
> <!-- <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> -->
> <!-- <negotiator type="challenge" description="_database/repo1.users"/> -->
> <!-- </acceptor>
> -->
>
> <repository name="repo1">
> <!-- <property name="overrideUUID" value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/> -->
> <property name="supportingAudits" value="true" />
> <property name="supportingBranches" value="true" />
>
> <!-- <userManager type="file" description="_database/repo1.users"/> -->
>
> <store type="db">
> ...
> I added the listenAddr and port attributes to the http acceptor element out of desperation. I get the same results without them. If I comment out the http acceptor and enable the tcp acceptor, everything works perfectly.
>
> Here's the output of ss:
>
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE org.eclipse.osgi_3.6.0.v20100517
> Fragments=45
> 1 RESOLVED c3p0_1.0.0
> 2 <<LAZY>> org.apache.derby_10.5.1.1_201005192117
> 3 RESOLVED com.my.companys.bundle_1.0.0
> 4 ACTIVE org.eclipse.emf.ecore_2.6.0.v20100614-1136
> 5 RESOLVED org.eclipse.equinox.launcher_1.1.0.v20100507
> Fragments=44
> 6 RESOLVED javax.xml_1.3.4.v201005080400
> 7 ACTIVE org.eclipse.core.contenttype_3.4.100.v20100505-1235
> 8 ACTIVE org.eclipse.equinox.app_1.3.0.v20100512
> 9 RESOLVED org.eclipse.core.filesystem.win32.x86_1.1.200.v20100505-1235
> Master=51
> 10 ACTIVE org.eclipse.net4j.http.common_3.0.0.v20100614-1656
> 11 RESOLVED org.apache.commons.codec_1.3.0.v20100518-1140
> 12 ACTIVE org.eclipse.core.resources_3.6.0.v20100526-0737
> Fragments=38
> 13 <<LAZY>> org.eclipse.net4j.db.derby_3.0.0.v20100614-1655
> 14 ACTIVE org.eclipse.emf.ecore.xmi_2.5.0.v20100521-1846
> 15 ACTIVE org.eclipse.net4j.db_3.0.0.v20100614-1654
> Fragments=16
> 16 RESOLVED net4j-frag_1.0.0.qualifier
> Master=15
> 17 ACTIVE org.eclipse.core.jobs_3.5.0.v20100515
> 18 ACTIVE org.eclipse.equinox.preferences_3.3.0.v20100503
> 19 <<LAZY>> org.eclipse.team.core_3.5.100.I20100527-0800
> 20 <<LAZY>> org.eclipse.core.variables_3.2.400.v20100505
> 21 ACTIVE org.eclipse.equinox.common_3.6.0.v20100503
> 22 ACTIVE org.eclipse.net4j.http.server_3.0.0.v20100614-1655
> 23 ACTIVE org.eclipse.update.configurator_3.3.100.v20100512
> 24 <<LAZY>> org.eclipse.core.expressions_3.4.200.v20100505
> 25 RESOLVED jtds_1.0.0
> 26 RESOLVED org.apache.commons.httpclient_3.1.0.v201005080502
> 27 ACTIVE org.eclipse.emf.cdo_3.0.0.v20100614-1657
> 28 <<LAZY>> org.eclipse.ant.core_3.2.200.v20100427
> 29 RESOLVED org.eclipse.core.runtime.compatibility.registry_3.3.0.v20100 520
> Master=39
> 30 ACTIVE org.eclipse.net4j_3.0.0.v20100614-1655
> 31 ACTIVE org.eclipse.equinox.http.registry_1.1.0.v20100503
> 32 ACTIVE org.eclipse.emf.common_2.6.0.v20100614-1136
> 33 ACTIVE org.eclipse.core.runtime.compatibility.auth_3.2.200.v2010051 7
> 34 ACTIVE org.eclipse.emf.cdo.common_3.0.0.v20100614-1655
> 35 RESOLVED com.springsource.javax.servlet_2.5.0
> 36 RESOLVED org.eclipse.osgi.services_3.2.100.v20100503
> 37 RESOLVED org.apache.commons.logging_1.1.1.v201005080502
> 38 RESOLVED org.eclipse.core.resources.win32.x86_3.5.100.v20100505-1345
> Master=12
> 39 ACTIVE org.eclipse.equinox.registry_3.5.0.v20100503
> Fragments=29
> 40 ACTIVE org.eclipse.net4j.tcp_3.0.0.v20100614-1656
> 41 ACTIVE org.eclipse.emf.cdo.server_3.0.0.v20100614-1654
> 42 RESOLVED org.eclipse.osgi.util_3.2.100.v20100503
> 43 ACTIVE org.eclipse.net4j.http_3.0.0.v20100614-1655
> 44 RESOLVED org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
> Master=5
> 45 RESOLVED javax.transaction_1.1.1.v201006150915
> Master=0
> 46 <<LAZY>> org.eclipse.emf.ecore.change_2.5.0.v20100521-1846
> 47 ACTIVE org.eclipse.core.runtime_3.6.0.v20100505
> 48 ACTIVE org.eclipse.net4j.util_3.0.0.v20100614-1655
> 49 ACTIVE org.eclipse.emf.cdo.server.db_3.0.0.v20100614-1654
> 50 RESOLVED javax.servlet_2.5.0.v200910301333
> 51 ACTIVE org.eclipse.core.filesystem_1.3.0.v20100526-0737
> Fragments=9
>
>
> Any documentation on the HTTP acceptor would be helpful. Specifically, I'd like to know if it supports HTTPS or if it will in the future.
>
> Thanks,
> Dave
>
>
Re: [net4j] Configuring the HTTP Acceptor [message #936908 is a reply to message #632857] Mon, 08 October 2012 13:15 Go to previous messageGo to next message
Key Ofeka is currently offline Key OfekaFriend
Messages: 14
Registered: January 2011
Junior Member
Did anyone succeed to setup HTTP acceptor? It doesn't work for us.

CDO server starts without errors, but there's nothing listening to the port 8181.

Any hints? Thanks.

<cdoServer>

<acceptor type="http" listenAddr="localhost" port="8181">
</acceptor>

<!-- <acceptor type="tcp" listenAddr="localhost" port="1111">
</acceptor> -->

<repository name="repo1">
<property name="supportingAudits" value="true"/>
<property name="supportingBranches" value="false"/>
<property name="supportingEcore" value="true"/>

<store type="db">
<mappingStrategy type="horizontal">
<property name="qualifiedNames" value="false"/>
<property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
<property name="toOneReferences" value="LIKE_ATTRIBUTES"/>

</mappingStrategy>


<dbAdapter name="h2"/>
<dataSource class="org.h2.jdbcx.JdbcDataSource"
uRL="jdbc:h2:file:repo;DB_CLOSE_ON_EXIT=FALSE;IFEXISTS=FALSE;AUTO_SERVER=TRUE"/>
</store>
</repository>
Re: [net4j] Configuring the HTTP Acceptor [message #936977 is a reply to message #936908] Mon, 08 October 2012 14:34 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5590
Registered: July 2009
Senior Member
Am 08.10.2012 15:15, schrieb Key Ofeka:
> Did anyone succeed to setup HTTP acceptor? It doesn't work for us.
>
> CDO server starts without errors, but there's nothing listening to the port 8181.
You must start the special org.eclipse.net4j.http.internal.server.Net4jTransportServlet, call its setRequestHandler()
method and pass in your HTTPAcceptor instance as the requestHandler.

There's also a convenient nested class ContainerAware that automatically looks up / creates an HTTPAcceptor in the
central managed container from the servlet's init() method. I think this acceptor would be the same one that'll picked
up by your cdo-server.xml below.

I just ran the shipped HTTPServer OSGi launch config and the test case org.eclipse.net4j.http.tests.HTTPTest.test1() to
validate basic functionality. It worked after I adjusted some of the server launches' dependencies.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


>
> Any hints? Thanks.
>
> <cdoServer>
>
> <acceptor type="http" listenAddr="localhost" port="8181">
> </acceptor>
>
> <!-- <acceptor type="tcp" listenAddr="localhost" port="1111">
> </acceptor> -->
>
> <repository name="repo1">
> <property name="supportingAudits" value="true"/>
> <property name="supportingBranches" value="false"/>
> <property name="supportingEcore" value="true"/>
>
> <store type="db">
> <mappingStrategy type="horizontal">
> <property name="qualifiedNames" value="false"/>
> <property name="toManyReferences" value="ONE_TABLE_PER_REFERENCE"/>
> <property name="toOneReferences" value="LIKE_ATTRIBUTES"/>
>
> </mappingStrategy>
>
>
> <dbAdapter name="h2"/>
> <dataSource class="org.h2.jdbcx.JdbcDataSource"
> uRL="jdbc:h2:file:repo;DB_CLOSE_ON_EXIT=FALSE;IFEXISTS=FALSE;AUTO_SERVER=TRUE"/>
> </store>
> </repository>
>
Re: [net4j] Configuring the HTTP Acceptor [message #937954 is a reply to message #936977] Tue, 09 October 2012 12:04 Go to previous message
Key Ofeka is currently offline Key OfekaFriend
Messages: 14
Registered: January 2011
Junior Member
Thanks, I succeeded to set up an http acceptor and to start up our CDOServer. The client successfully connected.

Unfortunately we can use this due to performance issues. It is incredibly slow.
Previous Topic:how to get the reachable objects from an EObject
Next Topic:BinaryResource lost unsettable empty values
Goto Forum:
  


Current Time: Sun Dec 21 11:32:01 GMT 2014

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

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