Resolution: Works as designed
Affects Version/s: 3.1.2_b05
Fix Version/s: None
We use the following set up:
- An OSGi bundle containing a simple java class named MyOSGI.
This bundle is deployed on Glassfish as OSGi bundle as well as
available as simple jar file in the classpath of a java process.
- A MessageDrivenBean which processes object messages. The object
messages containing instances of MyOSGI.
- The object messages are sent from external jms clients.
This works fine if
- you start Glassfish,
- deploy the OSGI bundle,
- deploy the EJB jar containing the MessageDrivenBean
- call the external JMS client.
This failes if
- you redeploy the OSGI bundle,
- redeploy the EJB jar containing the MessageDrivenBean
- call the external JMS client,
without restarting the Glassfish instance.
So if you redeploy the OSGI bundle and the EJB jar processing
of message fails because the MessageDrivenBean can not cast the
received object to MyOSGI.
The following exception is seen in that case, after redeployment:
java.lang.ClassCastException: com.macd.osgi.bundle.MyOSGI cannot be cast to