Probably because you cannot abitrarily deserialize a BundleContext object. A BundleContext maintains a bundle's context within a running OSGi framework instance. Since that context is stateful and includes things like the set of services registered and used by a bundle, there is no way to arbitrarily deserialize that information in future execution context. --
BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [EMAIL PROTECTED] office: +1 386 848 1781 mobile: +1 386 848 3788 "Todd Nist" <[EMAIL PROTECTED]> 2007-07-06 13:50 Please respond to [email protected] To <[EMAIL PROTECTED]> cc Subject BundleContextImpl - not serializable ? Is there a reason that org.apache.felix.framework.BundleContextImpl does not implement serializable? I understand that the context should be private to the activator, but other then that is there some other reason for it not being serializable? I have the following scenario: I am embedding Felix inside of several J2EE Containers, JBoss, OC4J and WebLogic. I am attempting to use the services provided by Felix from within the context of the J2EE container, specifically an EJB calling a service. I planed on achieving this by binding the HostBundleActivator (BundleActivator) created during the startup of Felix to the JNDI tree and gaining access to it from there. The reason for using Felix is to allow for the extensibility of services by third parties in case anyone is wondering why I am trying this. Anyways the problem I am encountering is that when I bind the HostBundleActivator to JBoss version 4.0.5, I get a serialization exception on the org.apache.felix.framework.BundleContextImpl since it does not implement serializable. Any insight on why the BundleContextImpl is not serializable would be appreciated. Regards, Todd
