[jbosscache-dev] Serialization and binding to JNDI

Brian Stansberry brian.stansberry at redhat.com
Tue Aug 11 19:03:54 EDT 2009


JBCACHE-1514 is not an issue for the AS. As Galder described, the 
CacheManager is bound in JNDI, and only in the java: namespace. The 
NonSerializableFactory is just a javax.naming.spi.ObjectFactory that 
uses a static map to cache objects. It will only return objects to 
callers inside the same VM.

On 08/11/2009 09:14 AM, Galder Zamarreno wrote:
>
> On 08/11/2009 02:57 PM, Galder Zamarreno wrote:
>> On 08/11/2009 01:54 PM, Manik Surtani wrote:
>>> On 11 Aug 2009, at 12:43, Galder Zamarreno wrote:
>>>
>>>> On 08/11/2009 01:20 PM, Manik Surtani wrote:
>>>>> Brian, how important is
>>>>>
>>>>> https://jira.jboss.org/jira/browse/JBCACHE-1514
>>>>>
>>>>> to you? Or do you not bind cache instances to JNDI/not see this
>>>>> problem with JBoss AS' JNDI impl?
>>>> Afaik, Only AS's cache manager
>>>> (org.jboss.ha.cachemanager.CacheManager) is bound to JNDI. I don't
>>>> think we recommend binding cache instances but instead binding some
>>>> form of cache manager instead. Not sure if you can directly bind the
>>>> JBC's default cache manager.
>>> Surely then AS's cache manager has references to Cache instances? So
>>> these are either transient or exposed to potentially being serialized as
>>> well?
>
> The thing is, org.jboss.ha.cachemanager.CacheManager is not Serializable
> and hence, Brian has used a different method that involves binding
> CacheManager to the NonSerializableFactory and then binding a JNDI a
> Serializable reference (javax.naming.Reference) that seems to point to
> the non serializable cache manager.
>
> I don't know much about the method other than I was able to read from
> the code but just in case, here's the CacheManager class file:
>
> http://anonsvn.jboss.org/repos/jbossas/projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/ha/cachemanager/CacheManager.java
>
> So, to sum up, I can't say whether 1514 affects AS or not.
>
>> Let me check AS trunk...
>>
>>>>> Cheers
>>>>> --
>>>>> Manik Surtani
>>>>> manik at jboss.org
>>>>> Lead, Infinispan
>>>>> Lead, JBoss Cache
>>>>> http://www.infinispan.org
>>>>> http://www.jbosscache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> jbosscache-dev mailing list
>>>>> jbosscache-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jbosscache-dev
>>>> --
>>>> Galder Zamarreño
>>>> Sr. Software Engineer
>>>> Infinispan, JBoss Cache
>>> --
>>> Manik Surtani
>>> manik at jboss.org
>>> Lead, Infinispan
>>> Lead, JBoss Cache
>>> http://www.infinispan.org
>>> http://www.jbosscache.org
>>>
>>>
>>>
>>>
>


-- 
Brian Stansberry
Lead, AS Clustering
JBoss by Red Hat


More information about the jbosscache-dev mailing list