title: How to call datasource in OSGI bundle?
body: <p>Is it possible to call <code>@Datasource</code> insight OSGI bundle? I configured Connection pool in the Glassfish 3.1.1 Server. I can make queries from simple JSF application.
    This is the source code of the bundles:
  <a href="http://www.2shared.com/file/H8kNkMrI/SH_27.html" rel="nofollow">http://www.2shared.com/file/H8kNkMrI/SH_27.html</a></p>
  
  <p>This is the source code that I'm trying to write:</p>
  
  <pre><code>package org.DX_57.osgi.SH_27.impl;
  
  import javax.activation.DataSource;
  import javax.annotation.Resource;
  import org.DX_57.osgi.SH_27.api.SessionHandle;
  
  public class SessionHandleImpl implements SessionHandle {
  
          public String error_Message = null;
          public String error_Database = null;
  
          /** Call the Oracle JDBC Connection driver */
          @Resource(name="jdbc/Oracle")
          public DataSource ds;
  
      public String sayHello(String name) {
          return "Howdy " + name;
      }                      
  }
  </code></pre>
  
  <p>When I try to compile the code with Netbeans this error appears:</p>
  
  <pre><code>[bundle:bundle]
  Bundle org.DX_57.osgi.SH_27:SH_27-impl:bundle:1.0-SNAPSHOT : Unresolved references to [javax.activation, javax.annotation] by class(es) on the Bundle-Classpath[Jar:dot]: [org/DX_57/osgi/SH_27/impl/SessionHandleImpl.class]
  Error(s) found in bundle configuration
  ------------------------------------------------------------------------
  Reactor Summary:
  
  SH_27 ............................................. SUCCESS [0.639s]
  SH_27-api ......................................... SUCCESS [5.162s]
  SH_27-impl ........................................ FAILURE [1.930s]
  ------------------------------------------------------------------------
  BUILD FAILURE
  ------------------------------------------------------------------------
  Total time: 8.950s
  Finished at: Mon Jan 23 15:59:42 EET 2012
  Final Memory: 18M/47M
  ------------------------------------------------------------------------
  Failed to execute goal org.apache.felix:maven-bundle-plugin:2.3.6:bundle (default-bundle) on project SH_27-impl: Error(s) found in bundle configuration -&gt; [Help 1]
  </code></pre>
  
  <p>Do you have any idea what I'm missing?</p>
  
  <hr>
  
  <p><strong>Update</strong>: Bundle plugin is unable to see javax.annotation and javax.activation classes while trying to compute OSGi manifest of my bundle and decide what to package in ther jar. I have to fix the pom.xml. 
  This is the source code of the OSGI bundle.</p>
  
  <p>How I must repair the POM file?</p>
  
  <hr>
  
  <p><strong>Update 2</strong>: This is the full error stack from Netbeans:</p>
  
  <p><a href="http://pastebin.com/R2hnRHVW" rel="nofollow">http://pastebin.com/R2hnRHVW</a></p>
  
  <p>And this is the POM file:</p>
  
  <p><a href="http://pastebin.com/Tc1gJiwU" rel="nofollow">http://pastebin.com/Tc1gJiwU</a></p>
  
  <p>Would you help me to fix the POM file?</p>