OSGi Applications: Known restrictions

There are a small number of known restrictions that apply when working with OSGi Applications.

List of known OSGi Applications issues and restrictions

Blueprint bean implementation classes cannot be final

The following Blueprint XML example code declares a Blueprint-managed bean, which is backed by an instance of the com.acme.MyBeanImpl implementation class. This class is defined in com.acme.MyBeanImpl.java:
<bean id="beanId" class="com.acme.MyBeanImpl">
  <property name="logger" ref="loggingService"/>
</bean>
In this example, the com.acme.MyBeanImpl implementation class is subject to the following restrictions:
  • It cannot be declared final.
  • It cannot be declared as an enumeration because this process also makes the class final.
  • It cannot contain any final methods.
In your code, none of the Blueprint bean implementation classes can be final. If you specify a Blueprint bean implementation class that is final, you get an exception message similar to the following message:
[16/03/10 15:38:16:906 GMT] 00000013 BlueprintCont E
org.apache.aries.blueprint.container.BlueprintContainerImpl doRun
Unable to start blueprint container for bundle
com.ibm.componenttest.logging
org.osgi.service.blueprint.container.ComponentDefinitionException:
Unable to proxy bean for interceptors:
org.apache.aries.blueprint.proxy.FinalModifierException
at org.apache.aries.blueprint.proxy.AsmInterceptorWrapper.
   createProxyObject(AsmInterceptorWrapper.java:148)
at org.apache.aries.blueprint.container.BeanRecipe.
   addInterceptors(BeanRecipe.java:651)
at
...

You cannot deploy a V8.5 OSGi application to a V8.0 WebSphere Application Server

If you attempt to deploy an OSGi application that includes V8.5 features to a V8.0 WebSphere® Application Server, the deployment fails with an exception.

For example, if the source code refers to an enterprise bean by using an @EJB annotation, the bean injection fails during application deployment.


Icon that indicates the type of topic Reference topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-base-iseries&topic=ra_restrict
File name: ra_restrict.html