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
- We cannot deploy a V8.5 OSGi application to a V8.0 WAS
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 we specify a Blueprint bean implementation class that is final, we 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 ...
We cannot deploy a V8.5 OSGi application to a V8.0 WAS
If we 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 using an @EJB annotation, the bean injection fails during application deployment.
Related:
JMS and OSGi Applications Developing an OSGi application Develop applications that use the Java Persistence API OSGi Service Platform Release 4 Version 4.2 Enterprise Specification Migrate and coexisting for OSGi applications
File name: was1529.html
prettyPrint();