You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2006/06/29 16:46:17 UTC
svn commit: r418060 -
/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java
Author: rickhall
Date: Thu Jun 29 07:46:15 2006
New Revision: 418060
URL: http://svn.apache.org/viewvc?rev=418060&view=rev
Log:
Added a private getContext() method so that it is possible to run
Equinox' Declarative Services impl on Felix.
Modified:
incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java
Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java?rev=418060&r1=418059&r2=418060&view=diff
==============================================================================
--- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java (original)
+++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/BundleImpl.java Thu Jun 29 07:46:15 2006
@@ -50,6 +50,22 @@
m_info = info;
}
+ /**
+ * This method is a hack to make Felix compatible with Equinox'
+ * Declarative Services implementation; this should be revisited
+ * in the future.
+ * @return the bundle context associated with this bundle.
+ **/
+ private BundleContext getContext()
+ {
+ BundleContext bc = m_info.getContext();
+ if (bc == null)
+ {
+ m_info.setContext(new BundleContextImpl(m_felix, this));
+ }
+ return m_info.getContext();
+ }
+
public long getBundleId()
{
return m_info.getBundleId();