Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
serializableFactory is being ignored Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • serializableFactory is being ignored


    We're currently using the caching (with EHCache) for various data, but I had to write my own SerializableFactory so it would be possible to cache BufferedImages.

    Unfortunately, it seems the serializableFactory property of the cacheManagerFacade is being ignored:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""
      <ehcache:config failQuietly="false" />
        <ehcache:caching id="proxy" cacheName="client.proxyCache" />
        <!-- <ehcache:caching id="largecontent"
          cacheName="largeContentCache" /> -->
        <ehcache:flushing id="proxy" cacheNames="client.proxyCache" />
      <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
        <property name="configLocation">
      <bean id="cacheProviderFacade" class="org.springmodules.cache.provider.ehcache.EhCacheFacade">
        <property name="cacheManager" ref="cacheManager" />
        <property name="serializableFactory" ref="customSerializableFactory" />
      <bean id="customSerializableFactory" class="ByteArraySerializableFactory" />
    When debugging in Eclipse, it doesn't even enter makeSerializableIfNecessary method (I even threw an exception there, so I should have noticed ).

    What am I missing here? The point of a serializableFactory is to provide serialization functionality for non-serializable objects when the cache doesn't support them, isn't it?

  • #2
    You might have ran into a bug - probably caused by namespace parser. Please raise the issue on JIRA - a simple example/configuration would help in fixing the bug.
    Thank you.