[ https://issues.apache.org/jira/browse/GEODE-8735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272178#comment-17272178 ]
ASF subversion and git services commented on GEODE-8735: -------------------------------------------------------- Commit c9da83ab5aed349930cf7c4221a84b729e978dd6 in geode-native's branch refs/heads/develop from Mario Salazar de Torres [ https://gitbox.apache.org/repos/asf?p=geode-native.git;h=c9da83a ] GEODE-8735: Change factory logic for symbols lookup (#700) * GEODE-8735: Change factory logic for symbols lookup - In order to allow that factory logic looks into the application space for symbols, `library-name` field has been made optional. - This removes the need to create shared library for in order to define custom factories like cache loaders, cache writers, cache listeners, partition resolvers or persistance managers whenever the cache is instantiated declaratively. - Whenever library-name is not specified a handle to the executable is obtained. - Take into account that for OS like Linux, Mac... in addition to exporting the symbols in the application, you would need to specify `-rdynamic` option while compiling. - Documentation has been updated. * GEODE-8735: Revision 2 - Fixed application space factory functions. It seemed that loading factory functions from the application was not actually working. - Added an IT to verify that application space partition resolver factories are working. - Consequently an IT for shared library factories have been added to verify that the functionality was not working. - Added test factories to the testobject shared library. - Given GenerateExportHeader CMake module does not support executables and we need to set visibility attributes for the test factory functions inside cpp-integration-test, a new cmake module 'ExecutableExportHeader' has been added to support this. - In order to export symbols in a executable ENABLE_EXPORTS property needs to be specified for the target in CMake. Therefore, this property has been added for cpp-integration-test target. * GEODE-8735: Revision 3 - Changed client cache XML schema and namespace to the right ones. > Enable factory lookup logic to look for symbols in the application > ------------------------------------------------------------------ > > Key: GEODE-8735 > URL: https://issues.apache.org/jira/browse/GEODE-8735 > Project: Geode > Issue Type: Improvement > Components: native client > Affects Versions: 1.13.1 > Reporter: Mario Salazar de Torres > Priority: Major > Labels: pull-request-available > > *AS A* native client contributor > *I WANT* to be able to specify factory names within the application space > *SO THAT* the user does not need to create a separate shared library to load > several items like partition resolvers, cache loaders, cache writers, > partition resolvers... > ---- > *Additional information* > The rationale for this change is that if the user wants to declaratively > specify a partition resolver, right now the only way is by creating the > shared library. > So the idea would be to change the current factory implementation, so library > name is an optional field, and whenever "library-name" is not specified, the > client will look for symbols within the application instead. > *For example:* > Using this region definition: > {code:xml} > <region name="region_part_a"> > <region-attributes refid="CACHING_PROXY" > pool-name="partitioned-pool"> > <partition-resolver library-function-name="createPartitionResolver"/> > </region-attributes> > </region> > {code} > And within the application defining this function: > {code:cpp} > APPLICATION_EXPORT PartitionResolver* createPartitionResolver() > { > return new StringPrefixPartitionResolver{}; > } > {code} > You could declaratively create a region which uses the > StringPrefixPartitionResolver. > *IMPORTANT.* Take into account that documentation should be updated in order > to indicate that library-name will become an optional field and what it means > whenever it's not present. -- This message was sent by Atlassian Jira (v8.3.4#803005)