Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2ABCA9ECC for ; Wed, 21 Mar 2012 10:02:30 +0000 (UTC) Received: (qmail 46994 invoked by uid 500); 21 Mar 2012 10:02:29 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 46915 invoked by uid 500); 21 Mar 2012 10:02:28 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 46905 invoked by uid 99); 21 Mar 2012 10:02:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 10:02:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of soyelmateo@gmail.com designates 209.85.214.177 as permitted sender) Received: from [209.85.214.177] (HELO mail-ob0-f177.google.com) (209.85.214.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 10:02:22 +0000 Received: by obbup16 with SMTP id up16so888502obb.22 for ; Wed, 21 Mar 2012 03:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=oKH7xrVglxoqhZbSPW8NLJNd+Bl+m3HMWT+PafyHmLM=; b=VmGgKZ48QP+Jv/NolbztbPNjlKH16bHTjqozrSGg9v9JA0byAC3PJbJ1yQGBCCm0Db OR/vs24MZmrMMEkNySFs1AGUydlViLojD7bUIe+OqGV8cEAJize8FNo2ZHe0eBQc+u9s Cz8uDy81I8betYjTBq+JI+yfREeTV+ZKc5dh5HuR1TnQeJgNFpUKwRbDnr1VJlGPW22a Uk0A7GgSxzzAzpsnOjxn/WMWiinshxM0GzGgYhyHUZPnLPbRrB8IUQ+tfs0lBFEd0VA/ p6JPUk5s86xV59JqEhm+mp32CEToMu42BItNWDcOOIq3uKmiW4gRl7fL1icLlcEeatnN FUbw== MIME-Version: 1.0 Received: by 10.182.188.38 with SMTP id fx6mr3583643obc.77.1332324121200; Wed, 21 Mar 2012 03:02:01 -0700 (PDT) Received: by 10.182.75.195 with HTTP; Wed, 21 Mar 2012 03:02:01 -0700 (PDT) In-Reply-To: <4F687468.3070700@die-schneider.net> References: <4F6319A6.2060109@die-schneider.net> <4F64D646.2050708@die-schneider.net> <4F2F925C53AC43E5BF3B1F2F3C425082@gmail.com> <4F687468.3070700@die-schneider.net> Date: Wed, 21 Mar 2012 11:02:01 +0100 Message-ID: Subject: Re: Connect a bundle to a data base From: elMateo To: users@felix.apache.org Content-Type: multipart/alternative; boundary=f46d04478bddf84adf04bbbde167 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04478bddf84adf04bbbde167 Content-Type: text/plain; charset=ISO-8859-1 I'm working with the code of Neil and I have a problem: Felix show a java.lang.ClassNotFoundException: javax.sql.DataSource not found I import the javax.sql package in my manifest file but I don't know if I need a bundle with this package in my Apache Felix. If I need a bundle with this, what is this bundle? I don't find a bundle called javax.sql and I have imported the MySQL connector/J bundle too. On Tue, Mar 20, 2012 at 1:13 PM, Christian Schneider < chris@die-schneider.net> wrote: > Absolutely. That is what I wanted to say in my last post. The only problem > with this aproach is that you hardcode the database type in your bridge > bundle. > ( At least if you dont want to mess with the classloader). > > As you probably will not have that many database types in one use case > this is probably ok though. > > Christian > > > Am 20.03.2012 11:27, schrieb Neil Bartlett: > > You certainly don't need Glassfish... you don't need Karaf or Blueprint >> either. >> >> There is a tendency on many mailing lists to respond to beginner >> questions with answers like "you can do this with product X" where X >> happens to be the product that the person is working on or selling. Those >> products may indeed add value but they are rarely the only or the simplest >> way to achieve what you want! >> >> To register a DataSource service with pure OSGi, it's as simple as >> writing this code in a BundleActivator (using MySQL as an example): >> >> DataSource ds = new com.mysql.jdbc.jdbc2.optional.**MysqlDataSource(); >> context.registerService(**DataSource.class.getName(), ds, null); >> >> This would be your "bridge" bundle that you deploy alongside the MySQL >> driver JAR. For other database types, write a different 2 lines of code and >> deploy that bundle instead. >> >> Kind regards, >> Neil >> >> >> > -- > Christian Schneider > http://www.liquid-reality.de > > Open Source Architect > Talend Application Integration Division http://www.talend.com > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org > For additional commands, e-mail: users-help@felix.apache.org > > --f46d04478bddf84adf04bbbde167--