Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
-> install http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-discovery-clientinterface/1.12/cxf-dosgi-ri-samples-discovery-clientinterface-1.12.jar
-> installstart http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-discovery-interfaceclient/1.12/cxf-dosgi-ri-samples-discovery-interfaceclient-1.12.jar
-> start 7
-> start 8
-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.8.0)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
[   4] [Resolved   ] [    1] OSGi R4 Compendium Bundle (4.1.0)
[   5] [Active     ] [    1] Distributed OSGi Distribution Software Single-Bundle Distribution
[   6] [Active     ] [    1] Distributed OSGI OSGiDiscovery Zookeeper-BasedSample DiscoveryClient Single-Bundle Distribution
[   7] [Active     ] [    1] Distributed OSGI Discovery Sample Client Bundle
[   8] [Active     ] [    1] Distributed OSGI Discovery Sample Interface Bundle
Interface Bundle

After a brief moment, After a brief moment, you will see messages appearing on the controller side. These are the messages sent to all registered displays. Since there are none, they won't show up anywhere just yet.

...

Code Block
-> install http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-discovery-interface/1.12/cxf-dosgi-ri-samples-discovery-interface-1.12.jar
-> start 7
-> install http://repo1.maven.org/maven2/org/apache/cxf/dosgi/samples/cxf-dosgi-ri-samples-discovery-impl/1.12/cxf-dosgi-ri-samples-discovery-impl-1.12.jar
-> start 8
-> ps
START LEVEL 1
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (1.8.0)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.2.0)
[   2] [Active     ] [    1] Apache Felix Shell TUI (1.2.0)
[   3] [Active     ] [    1] Apache Felix Bundle Repository (1.4.0)
[   4] [Resolved   ] [    1] OSGi R4 Compendium Bundle (4.1.0)
[   5] [Active     ] [    1] Distributed OSGi Distribution Software Single-Bundle Distribution (1.1.0.SNAPSHOT)
[   6] [Active     ] [    1] Distributed OSGiOSGI Zookeeper-Based Discovery Single-BundleSample Distribution (1.1.0.SNAPSHOT)Interface Bundle
[   7] [Active     ] [    1] Distributed OSGI Discovery Sample InterfaceImplementation Bundle

You will start seeing the messages appear on the remote display:

Code Block
DisplayService [myhost:1816]: some  8] [Active     ] [    1] Distributed OSGI Discovery Sample Implementation Bundle

You will start seeing the messages appear on the remote display:

Code Block
text 145
DisplayService [myhost:1816]: some text 145146
DisplayService [myhost:1816]: some text 146
... ... 

You You can add more Display Services and they will also receive the messages.

...

Code Block
-> get /osgi/service_registry/org/apache/cxf/dosgi/samples/discovery/DisplayService/myhost#1816##display
Processing get
#
#Tue Jun 09 14:52:39 BST 2009
osgi.remote.endpoint.location=http\://myhost\:1816/display
osgi.remote.interfaces=*
osgi.remote.configuration.pojo.address=http\://myhost\:1816/display
osgi.remote.configuration.type=pojo
osgi.remote.endpoint.id=0ffe1fbf-c029-4096-bc14-3c7d77470dfd

cZxid = 511
ctime = Tue Jun 09 14:52:39 BST 2009
mZxid = 511
mtime = Tue Jun 09 14:52:39 BST 2009
pZxid = 511myhost#52807##display
<?xml version="1.0" encoding="UTF-8"?>
<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
  <endpoint-description>
    <property name="endpoint.framework.uuid" value="b151dd13-69fe-4d99-8006-fcdafeb48db8" />
    <property name="endpoint.id" value="http://myhost:52807/display" />
    <property name="endpoint.package.version.org.apache.cxf.dosgi.samples.discovery" value="0.0.0" />
    <property name="endpoint.service.id" value-type="Long" value="16" />
    <property name="objectClass">
      <array>
        <value>org.apache.cxf.dosgi.samples.discovery.DisplayService</value>
      </array>
    </property>
    <property name="org.apache.cxf.ws.address" value="http://myhost:52807/display" />
    <property name="service.imported" value="true" />
    <property name="service.imported.configs">
      <array>
        <value>org.apache.cxf.ws</value>
      </array>
    </property>
    <property name="service.intents">
      <array>
        <value>SOAP.1_1</value>
        <value>HTTP</value>
        <value>SOAP</value>
      </array>
    </property>
  </endpoint-description>
</endpoint-descriptions>

cZxid = 0x13
ctime = Fri Jun 25 15:57:09 BST 2010
mZxid = 0x13
mtime = Fri Jun 25 15:57:09 BST 2010
pZxid = 0x13
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 815631244713656340x1296f9228b40004
dataLength = 3381150
numChildren = 0

Other Resources

Introducing Dynamic Discovery into OSGi Distributed Applications - http://blog.akquinet.de/2009/09/23/introducing-dynamic-discovery-into-osgi-distributed-applications/Image Removed