Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: bd50897caa07f24dc769df02586b02fa9fb161ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<h1>Creating Transport Connections</h1>
<a name="CreatingTransportConnections"/><p>
 This tutorial outlines the steps needed to create a Net4j IConnector and connect it to an IAcceptor.
 <p>
 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eu nibh in erat dapibus accumsan. Aenean cursus
 lacinia dictum. Mauris non sem sapien. Vivamus sem ante, posuere a rhoncus ac, varius in nisi. Sed pulvinar urna ac
 est iaculis mattis. Ut eget massa felis, nec volutpat purus. In id aliquet mi. Duis euismod sapien sollicitudin nisi
 vestibulum nec vulputate urna euismod. Proin pulvinar ornare nunc, ac auctor elit placerat eget. Integer eu erat ac
 risus ultricies mattis vel nec nunc. Proin venenatis tellus sit amet dui congue nec vehicula urna sollicitudin. Donec
 porta, risus eu auctor semper, ante lectus lobortis sem, a luctus diam dui eu sapien. Sed at metus et dolor tincidunt
 convallis id a est. Donec quam nisl, scelerisque a feugiat id, mattis vel urna. Suspendisse facilisis, libero ac
 ultricies dictum, mi sem feugiat purus, ac aliquam metus purus sed leo. Sed a viverra metus.

<h2>Select a Transport Type</h2>
<a name="CreatingTransportConnections.SelectTransportType"/><p>
 Currently supported transport types are:
 <ul>
 <li><b>JVM</b> to connect to an IJVMAcceptor in the same Java Virtual Machine.
 <li><b>TCP</b> to connect to an ITCPAcceptor by means of a SocketChannel.
 <li><b>SSL</b> an extension to the TCP transport that adds TLS/SSL security.
 <li><b>HTTP</b> to connect to an IHTTPAcceptor that is made available by a servlet.
 </ul>
 Continue with <a href="../../../../../../../../plugins/org.eclipse.emf.cdo.doc/src/org/eclipse/emf/cdo/doc/sessions/ConnectingToRepositories.html#ConnectingToRepositories.SetConnectionTimeout">Set Connection Timeout</a>.

<h2>Setup a Wiring Container</h2>
<a name="CreatingTransportConnections.SetupWiringContainer"/><p>
 Ut eget massa felis, nec volutpat purus. In id aliquet mi. Duis euismod sapien sollicitudin nisi vestibulum nec
 vulputate urna euismod. Proin pulvinar ornare nunc, ac auctor elit placerat eget. Integer eu erat ac risus
 ultricies mattis vel nec nunc. 

<div class="snippet" style="margin-left:24px;" align="left">
  <a name="snippet_snippet1"/>
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top-left.png"/></td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top1.png); background-repeat:repeat-x;" width="1px"><font face="Segoe UI,Arial" size="-1">snippet1.java</font></td>
      <td width="1px"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-close.png"/></td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top2.png); background-repeat:repeat-x;">&nbsp;</td>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top-right.png"/></td>
    </tr>
    <tr>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-left.png); background-repeat:repeat-y;">&nbsp;</td>
      <td colspan="3" align="left" valign="top" nowrap>
        <div style="margin:10px 0px 10px 0px;">
          <code>
            <font color="#3f7f5f">//&nbsp;Create&nbsp;a&nbsp;dedicated&nbsp;container&nbsp;instance</font><br/>
            IManagedContainer&nbsp;container&nbsp;=&nbsp;<a name="callout_snippet1_1_code" href="callout_snippet1_1"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-1.png"/></a>&nbsp;<font color="#7f0055"><b>new&nbsp;</b></font>ManagedContainer();<br/>
            <br/>
            <font color="#3f7f5f">//&nbsp;Register&nbsp;your&nbsp;custom&nbsp;factories</font><br/>
            container.registerFactory(&nbsp;<a name="callout_snippet1_2_code" href="callout_snippet1_2"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-2.png"/></a>&nbsp;<font color="#7f0055"><b>new&nbsp;</b></font>Factory(<font color="#2a00ff">&#34;org.eclipse.net4j.connectors&#34;</font>,&nbsp;<font color="#2a00ff">&#34;jms&#34;</font>)<br/>
            {<br/>
            &nbsp;&nbsp;<font color="#7f0055"><b>public&nbsp;</b></font>IConnector&nbsp;create(String&nbsp;description)&nbsp;<font color="#7f0055"><b>throws&nbsp;</b></font>ProductCreationException<br/>
            &nbsp;&nbsp;{<br/>
            &nbsp;&nbsp;&nbsp;&nbsp;<font color="#7f0055"><b>return&nbsp;</b></font><a name="callout_snippet1_3_code" href="callout_snippet1_3"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-3.png"/></a>&nbsp;<font color="#7f0055"><b>new&nbsp;</b></font>JMSConnector(description);<br/>
            &nbsp;&nbsp;}<br/>
            });<br/>
            <br/>
            <font color="#3f7f5f">//&nbsp;Use&nbsp;utility&nbsp;classes&nbsp;to&nbsp;register&nbsp;additional&nbsp;factories</font><br/>
            Net4jUtil.prepareContainer(container);<br/>
            TCPUtil.prepareContainer(container);<br/>
            <br/>
            <font color="#3f7f5f">//&nbsp;Do&nbsp;not&nbsp;forget&nbsp;to&nbsp;activate&nbsp;the&nbsp;container&nbsp;before&nbsp;you&nbsp;use&nbsp;it</font><br/>
            <a name="callout_snippet1_4_code" href="callout_snippet1_4"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-4.png"/></a>&nbsp;container.activate();
          </code>
        </div>
      </td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-right.png); background-repeat:repeat-y;">&nbsp;</td>
    </tr>
    <tr>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-bottom-left.png"/></td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-bottom.png); background-repeat:repeat-x;" colspan="3">&nbsp;</td>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-bottom-right.png"/></td>
    </tr>
  </table>
</div>
<p/>
<div style="margin-left:24px;"><a name="callout_snippet1_1" href="callout_snippet1_1_code"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-1.png"/></a>&nbsp;Create a searate IManagedContainer.</div>
<div style="margin-left:24px;"><a name="callout_snippet1_2" href="callout_snippet1_2_code"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-2.png"/></a>&nbsp;Create a factory with the <i>productGroup</i> "org.eclipse.net4j.connectors".</div>
<div style="margin-left:24px;"><a name="callout_snippet1_3" href="callout_snippet1_3_code"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-3.png"/></a>&nbsp;Create a JMS connector.</div>
<div style="margin-left:24px;"><a name="callout_snippet1_4" href="callout_snippet1_4_code"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-4.png"/></a>&nbsp;The new container can not be used when inactive.</div>
<p/>
 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 Etiam eu nibh in erat dapibus accumsan. Aenean cursus lacinia dictum. Mauris non sem sapien. Vivamus sem ante,
 posuere a rhoncus ac, varius in nisi. Sed pulvinar urna ac est iaculis mattis. Ut eget massa felis, nec volutpat
 purus. In id aliquet mi. Duis euismod sapien sollicitudin nisi vestibulum nec vulputate urna euismod. Proin
 pulvinar ornare nunc, ac auctor elit placerat eget. Integer eu erat ac risus ultricies mattis vel nec nunc. Proin
 venenatis tellus sit amet dui congue nec vehicula urna sollicitudin. Donec porta, risus eu auctor semper, ante
 lectus lobortis sem, a luctus diam dui eu sapien. Sed at metus et dolor tincidunt convallis id a est. Donec quam
 nisl, scelerisque a feugiat id, mattis vel urna. Suspendisse facilisis, libero ac ultricies dictum, mi sem feugiat
 purus, ac aliquam metus purus sed leo. Sed a viverra metus.

<h2>Add Configuration Parameters</h2>
<a name="CreatingTransportConnections.AddConfigurationParameters"/>

<h3>Set the Buffer Capacity</h3>
<a name="CreatingTransportConnections.AddConfigurationParameters.SetBufferCapacity"/><p>
 

<div class="snippet" style="margin-left:24px;" align="left">
  <a name="snippet_JMSConnector"/>
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top-left.png"/></td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top1.png); background-repeat:repeat-x;" width="1px"><font face="Segoe UI,Arial" size="-1">JMSConnector.java</font></td>
      <td width="1px"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-close.png"/></td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top2.png); background-repeat:repeat-x;">&nbsp;</td>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-top-right.png"/></td>
    </tr>
    <tr>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-left.png); background-repeat:repeat-y;">&nbsp;</td>
      <td colspan="3" align="left" valign="top" nowrap>
        <div style="margin:10px 0px 10px 0px;">
          <code>
            <font color="#7f0055"><b>public&nbsp;class&nbsp;</b></font>JMSConnector&nbsp;<font color="#7f0055"><b>extends&nbsp;</b></font>Connector<br/>
            {<br/>
            &nbsp;&nbsp;<font color="#7f0055"><b>public&nbsp;</b></font>JMSConnector(String&nbsp;description)<br/>
            &nbsp;&nbsp;{<br/>
            &nbsp;&nbsp;}<br/>
            <br/>
            &nbsp;&nbsp;<font color="#7f0055"><b>public&nbsp;</b></font><font color="#7f0055"><b>void&nbsp;</b></font>multiplexChannel(InternalChannel&nbsp;<a name="callout_JMSConnector_1_code" href="callout_JMSConnector_1"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-1.png"/></a>&nbsp;channel)<br/>
            &nbsp;&nbsp;{<br/>
            &nbsp;&nbsp;}<br/>
            <br/>
            &nbsp;&nbsp;&hellip;<br/>
            }
          </code>
        </div>
      </td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-right.png); background-repeat:repeat-y;">&nbsp;</td>
    </tr>
    <tr>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-bottom-left.png"/></td>
      <td style="background-image:url(../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-bottom.png); background-repeat:repeat-x;" colspan="3">&nbsp;</td>
      <td><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/editor-bottom-right.png"/></td>
    </tr>
  </table>
</div>
<p/>
<div style="margin-left:24px;"><a name="callout_JMSConnector_1" href="callout_JMSConnector_1_code"><img src="../../../../../../../../org.eclipse.emf.cdo.releng.doc/resources/callout-1.png"/></a>&nbsp;The channel must not be <code>null</code>.</div>
<p/>


<h3>Set the Connection Timeout</h3>
<a name="CreatingTransportConnections.AddConfigurationParameters.SetConnectionTimeout"/><p>
 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eu nibh in erat dapibus accumsan. Aenean cursus
 lacinia dictum. Mauris non sem sapien. Vivamus sem ante, posuere a rhoncus ac, varius in nisi. Sed pulvinar urna
 ac est iaculis mattis. Ut eget massa felis, nec volutpat purus. In id aliquet mi. Duis euismod sapien
 sollicitudin nisi vestibulum nec vulputate urna euismod. Proin pulvinar ornare nunc, ac auctor elit placerat
 eget. Integer eu erat ac risus ultricies mattis vel nec nunc. Proin venenatis tellus sit amet dui congue nec
 vehicula urna sollicitudin. Donec porta, risus eu auctor semper, ante lectus lobortis sem, a luctus diam dui eu
 sapien. Sed at metus et dolor tincidunt convallis id a est. Donec quam nisl, scelerisque a feugiat id, mattis vel
 urna. Suspendisse facilisis, libero ac ultricies dictum, mi sem feugiat purus, ac aliquam metus purus sed leo.
 Sed a viverra metus.

Back to the top