Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

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.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
serializableFactory is being ignored Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • serializableFactory is being ignored

    Hi,

    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:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:ehcache="http://www.springmodules.org/schema/ehcache"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springmodules.org/schema/ehcache http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd">
    
      <ehcache:config failQuietly="false" />
    
      <ehcache:annotations>
        <ehcache:caching id="proxy" cacheName="client.proxyCache" />
        <!-- <ehcache:caching id="largecontent"
          cacheName="largeContentCache" /> -->
        <ehcache:flushing id="proxy" cacheNames="client.proxyCache" />
      </ehcache:annotations>
    
      <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
        <property name="configLocation">
          <value>classpath:ehcache-client.xml</value>
        </property>
      </bean>
    
      <bean id="cacheProviderFacade" class="org.springmodules.cache.provider.ehcache.EhCacheFacade">
        <property name="cacheManager" ref="cacheManager" />
        <property name="serializableFactory" ref="customSerializableFactory" />
      </bean>
    
      <bean id="customSerializableFactory" class="ByteArraySerializableFactory" />
    </beans>
    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.

    Comment

    Working...
    X