Network Deployment (Distributed operating systems), v8.0 > Reference > Troubleshoot tips > Troubleshoot OSGi applications
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
- Enterprise JavaBeans (EJBs) cannot be invoked directly from an OSGi application
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 ...
Enterprise JavaBeans (EJBs) cannot be invoked directly from an OSGi application
An OSGi bundle or a web application bundle (WAB) cannot look up and invoke an EJB directly. However, an OSGi application can interact with EJB modules through either Service Component Architecture (SCA) or the Java Message Service (JMS):
- An OSGi application can be included in an SCA environment, and the SCA modules can be configured to bind to EJB modules.
- An OSGi application can interact with EJBs by sending JMS messages to destinations, and configuring the EJBs or message driven beans (MDBs) to retrieve the messages from those destinations and respond to them.
Related concepts:
About OSGi Applications
JMS and OSGi Applications
SCA and OSGi ApplicationsRelated tasks:
Secure OSGi Applications
Develop and deploying an OSGi application
Use OSGi applications as SCA component implementations
Develop applications that use the Java Persistence APIRelated reference:
OSGi Service Platform Release 4 v4.2 Enterprise Specification
OSGi Applications: Troubleshooting tips
Migrate and coexisting for OSGi applications
Reference topic Feedback
Copyright IBM Corporation 2009, 2011. All Rights Reserved.
This information center is powered by Eclipse technology.