cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache CXF > DOSGi Apache Karaf Feature
Date Sat, 26 Jan 2013 10:37:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/15/_/styles/combined.css?spaceKey=CXF&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CXF/DOSGi+Apache+Karaf+Feature">DOSGi
Apache Karaf Feature</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~christian%2Bschneider">Christian
Schneider</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>* [Download apache karaf|http://karaf.apache.org/index/community/download.html]
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">*
Copy etc/jre.properties.cxf to etc/jre.properties -&gt; This is needed in karaf 2.2.x
to adjust the system package exports so CXF can install correctly <br></td></tr>
            <tr><td class="diff-unchanged" >* Unpack and start it <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="DOSGiApacheKarafFeature-CXFDOSGiinApacheKaraf"></a>CXF
DOSGi in Apache Karaf</h1>

<p>Since version 1.4.0 of CXF DOSGi there is a feature for Apache Karaf which makes
installing DOSGi really easy. Using the descriptions below a working demo should be up in
less than 10 minutes.</p>

<h2><a name="DOSGiApacheKarafFeature-DownloadandunpackApacheKaraf"></a>Download
and unpack Apache Karaf</h2>

<ul>
	<li><a href="http://karaf.apache.org/index/community/download.html" class="external-link"
rel="nofollow">Download apache karaf</a></li>
	<li>Copy etc/jre.properties.cxf to etc/jre.properties -&gt; This is needed in karaf
2.2.x to adjust the system package exports so CXF can install correctly</li>
	<li>Unpack and start it</li>
</ul>


<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>CXF DOSGi does not work with Karaf
2.3.0. Please use the latest 2.2.x version for now.</td></tr></table></div>

<h2><a name="DOSGiApacheKarafFeature-InstallationofCXFDOSGi"></a>Installation
of CXF-DOSGi</h2>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
features:chooseurl cxf-dosgi 1.4.0
features:install cxf-dosgi-discovery-distributed
</pre>
</div></div>

<p>Create config "etc/org.apache.cxf.dosgi.discovery.zookeeper.cfg" with the following
content:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
zookeeper.port=2181
zookeeper.host=localhost
</pre>
</div></div>

<h2><a name="DOSGiApacheKarafFeature-InstallationofthezookeeperServer"></a>Installation
of the zookeeper Server</h2>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
features:install cxf-dosgi-zookeeper-server
</pre>
</div></div>

<p>Create config "etc/org.apache.cxf.dosgi.discovery.zookeeper.server.cfg" with the
following content:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
zookeeper.host:127.0.0.1
clientPort:2181
zookeeper.port:2181
</pre>
</div></div>

<h2><a name="DOSGiApacheKarafFeature-Testinstallationwithgreeterdemo"></a>Test
installation with greeter demo</h2>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
install -s mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-ri-samples-greeter-<span class="code-keyword">interface</span>/1.4.0
install -s mvn:org.apache.cxf.dosgi.samples/cxf-dosgi-ri-samples-greeter-impl/1.4.0
</pre>
</div></div>


<p>log:display should show the greeter service being exported:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
2013-01-07 10:50:52,108 | INFO  | pool-13-thread-1 | TopologyManagerExport            | r.exporter.TopologyManagerExport
 257 | 114 - cxf-dosgi-ri-topology-manager - 1.4.0 | TopologyManager: export sucessful Endpoints:
[Endpoint Desctiption <span class="code-keyword">for</span> ServiceReference [org.apache.cxf.dosgi.samples.greeter.GreeterService]
*** EndpointDescription: **** 
endpoint.framework.uuid  =&gt; 74455213-0926-4fa8-b3eb-0f9b4d15f119
endpoint.id  =&gt; http:<span class="code-comment">//localhost:9090/greeter
</span>endpoint.<span class="code-keyword">package</span>.version.org.apache.cxf.dosgi.samples.greeter
 =&gt; 0.0.0
endpoint.service.id  =&gt; 252
objectClass  =&gt; [org.apache.cxf.dosgi.samples.greeter.GreeterService]
org.apache.cxf.ws.address  =&gt; http:<span class="code-comment">//localhost:9090/greeter
</span>service.imported  =&gt; <span class="code-keyword">true</span>
service.imported.configs  =&gt; [org.apache.cxf.ws]
service.intents  =&gt; [SOAP.1_1, HTTP, SOAP]
]
</pre>
</div></div>

<h2><a name="DOSGiApacheKarafFeature-Accesstheservicetransparentlyfromasecondcontainer"></a>Access
the service transparently from a second container</h2>

<ul>
	<li>Unpack karaf in a second directory and also start it.</li>
	<li>Do the installation steps from "Installation of CXF-DOSGi"</li>
	<li>Install a client to a service that is published in the first container.</li>
	<li>DOSGi will automatically install a proxy for you service that calls the published
service remotely over CXF</li>
</ul>


    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CXF/DOSGi+Apache+Karaf+Feature">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=30741168&revisedVersion=6&originalVersion=5">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CXF/DOSGi+Apache+Karaf+Feature?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message