felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Nist" <Todd.N...@gi.leica-geosystems.com>
Subject RE: BundleContextImpl - not serializable ?
Date Mon, 09 Jul 2007 11:21:23 GMT

Thanks for the follow up.  The BundleContextImpl is in fact an instance
field in my HostBundleActivator as you gathered.  I did make it
transient, but the problem with that was that if the object did get
serialized, then when I reference it again causing it to be
de-serialized, the value of the BundleContextImpl was null.  This
needless to say resulted in a null pointer exception.

It makes sense why it is not serializable now based on BJ Hargrave
earlier reply to this message.

Again, thanks for the follow up and suggestion; much appreciated.


-----Original Message-----
From: Felix Meschberger [mailto:fmeschbe@gmail.com] 
Sent: Monday, July 09, 2007 1:58 AM
To: dev@felix.apache.org
Subject: Re: BundleContextImpl - not serializable ?

Hi Todd,

I assume the BundleContextImpl instance is a field in your
HostBundleActivator, which sounds like the reason for it to have to be
serializable. Have you tried declaring the field "transient" ? My
understanding is, that in this case the field should be exempted from


Am Freitag, den 06.07.2007, 13:50 -0400 schrieb Todd Nist:
> Is there a reason that org.apache.felix.framework.BundleContextImpl
> not implement serializable?  I understand that the context should be
> private to the activator, but other then that is there some other
> for it not being serializable?
> I have the following scenario: 
> I am embedding Felix inside of several J2EE Containers, JBoss, OC4J
> WebLogic.  I am attempting to use the services provided by Felix from
> within the context of the J2EE container, specifically an EJB calling
> service.  I planed on achieving this by binding the
> (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
> 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 

View raw message