[infinispan-issues] [JBoss JIRA] (ISPN-3979) JdbcStringBasedStore loading of Key2StringMapper class is too restrictive

Paul Ferraro (JIRA) issues at jboss.org
Fri Feb 7 17:28:28 EST 2014


Paul Ferraro created ISPN-3979:
----------------------------------

             Summary: JdbcStringBasedStore loading of Key2StringMapper class is too restrictive
                 Key: ISPN-3979
                 URL: https://issues.jboss.org/browse/ISPN-3979
             Project: Infinispan
          Issue Type: Bug
          Components: Loaders and Stores
    Affects Versions: 6.0.1.Final
            Reporter: Paul Ferraro
            Assignee: Dan Berindei
            Priority: Critical


Currently the Key2StringMapper of a JdbcStringBasedStore is specified to the JdbcStringBasedStoreConfigurationBuilder as a class name.  Yes, there is a method that accepts a Class<? extends Key2StringMapper>, but that simply stores the getName() of the Class!  The JdbcStringBasedStore loads the class using the class loader of the JdbcStringBasedStore class (via Class.forName(...).  This is too restrictive.  At the very least, JdbcStringBasedStore should use the classLoader defined in the cache Configuration (i.e. via ConfigurationBuilder.classLoader()) to load the class.  Why not also allow the JdbcStringBasedStoreConfigurationBuilder to specify a Key2StringMapper instance?
I would really like to make use of Key2StringMapper in WildFly to allow users the option to persist web sessions and SFSBs via the JdbcStringBasedStore (instead of the binary bucket-based store), but the current mechanism is incompatible with use cases where the Key2StringMapper is not known to class loader of the infinispan module.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list