chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sklev...@apache.org
Subject svn commit: r1177613 - /chemistry/site/trunk/content/java/examples/example-osgi.mdtext
Date Fri, 30 Sep 2011 11:41:14 GMT
Author: sklevenz
Date: Fri Sep 30 11:41:14 2011
New Revision: 1177613

URL: http://svn.apache.org/viewvc?rev=1177613&view=rev
Log:
OSGi documentation

Modified:
    chemistry/site/trunk/content/java/examples/example-osgi.mdtext

Modified: chemistry/site/trunk/content/java/examples/example-osgi.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/example-osgi.mdtext?rev=1177613&r1=1177612&r2=1177613&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/example-osgi.mdtext (original)
+++ chemistry/site/trunk/content/java/examples/example-osgi.mdtext Fri Sep 30 11:41:14 2011
@@ -1,6 +1,41 @@
-Title: Using OSGI with OpenCMIS
+Title:     Using OSGI with OpenCMIS
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
 # Using OSGI with OpenCMIS
 
-This example shows how to use OpenCMIS with OSGI bundles.
+## Client Factory with OSGi
+
+These examples show the first steps that are required in client applications: How to create
a session and connect to a repository using OSGi factory service.
+
+    :::java
+    // OSGi factory service
+    
+    BundleContext bundleContext = ...;  // retriev bundle context from OSGi runtime
+    ServiceReference serviceReference = bundleContext.getServiceReference(SessionFactory.class.getName());
+    SessionFactory factory = (SessionFactory) bundleContext.getService(serviceReference);

+    Map<String, String> parameter = new HashMap<String, String>();
+    
+    // fill in session parameter
+    parameter.put(...);
+    
+    // create session
+    Session session = factory.createSession(parameter);
+
+* [Creating a session](example-create-session.html)
+* [OSGi support for OpenCMIS](/java/developing/dev-osgi.html)
 
-TODO



Mime
View raw message