[
https://issues.apache.org/jira/browse/IGNITE-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136751#comment-15136751
]
Roman Shtykh commented on IGNITE-2448:
--------------------------------------
[~dmagda]
I have done the integration. Can you do a quick review before I ask Eduardo to
review from MyBatis standpoint and start writing docs?
https://github.com/shroman/ignite-cache
During the implementation I had two major concerns:
1. There is no _destroy()_ hook to stop grid. From mailing list it seems that
myBatis cannot have it, but I will recheck.
2. To create Ignite cache and grid, users will have to prepare
`IGNITE_HOME/config/default-config.xml` (or default configs will be used).
Since there is no way to set configuration parameters with the id coming as an
argument before _IgniteCacheAdapter_ instantiation, what I do in the
constructor is somehow hacky. Probably this is what Eduardo meant saying "There
is no special method to bootstrap the underlying cache system so this has to be
done in an static block" in our ML.
I provide 3 sample Ignite configuration files in `config/` with the default
server node in LOCAL mode. They are very simple, and I will mention in the docs
that eviction, expiration, etc. can be said according to how it is specified in
Ignite docs.
> Ignite based second level cache for MyBatis
> -------------------------------------------
>
> Key: IGNITE-2448
> URL: https://issues.apache.org/jira/browse/IGNITE-2448
> Project: Ignite
> Issue Type: New Feature
> Reporter: Denis Magda
> Assignee: Roman Shtykh
>
> MyBatis [1] has a concept of a second level cache.
> It makes sense to implement a module that will allow to use Ignite as a
> second level cache for this framework.
> In particular the following has to be done:
> - introduce ignite-cache module that will be located in MyBatis GIT
> repository [2]
> - implement MyBatis {{Cache}} interface [3]
> - there should be configs inside of the module for different exemplary cases
> (server node with a single local cache; server node that is a part of some
> cluster and caches mybatis data in replicatred or partitioned cache; client
> nodes that connects to the cluster and works with the cache);
> - add documentation about the integration on Ignite readme.io
> - as a reference you may refer to Hazelcast [4] or other implementation
> More on caches in MyBatis
> http://www.mybatis.org/mybatis-3/sqlmap-xml.html#cache
> [1] http://www.mybatis.org/
> [2] https://github.com/mybatis/
> [3]
> https://github.com/mybatis/mybatis-3/blob/master/src/main/java/org/apache/ibatis/cache/Cache.java
> [4] https://github.com/mybatis/hazelcast-cache
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)