You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by franck102 <fr...@yahoo.com> on 2017/07/24 17:04:25 UTC

Client requires DataSource bean configuration copy

I have a single server defining a cachestore on top of a JDBC data source
using the attached spring configuration.
I connect a single client, and I don't need to replicate the cache
configuration in the client: the client downloads it from the server on
startup. However I still need to declare the datasource bean that the
cache(s) use - else I get the exception below.
Is that an oversight, or some exchange / spring beans ordering problem? It
looks like if CacheStore exchange is supported then the lower-level beans
the cache depends on should be exchanged as well?
Can I force the client to synchronize / download data sources from the
server before the cache configuration exchange happens?

Thanks!

Mac_Franck-server.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n15491/Mac_Franck-server.xml>  




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-requires-DataSource-bean-configuration-copy-tp15491.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client requires DataSource bean configuration copy

Posted by franck102 <fr...@yahoo.com>.
In case someone else hits this, the issue is easily resolved by embedding
cachestore and datasource facotyr beans in the cache bean, instead of using
spring references:



Franck



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-requires-DataSource-bean-configuration-copy-tp15491p16166.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client requires DataSource bean configuration copy

Posted by franck102 <fr...@yahoo.com>.
Thanks Val, that makes sense.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-requires-DataSource-bean-configuration-copy-tp15491p15576.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client requires DataSource bean configuration copy

Posted by vkulichenko <va...@gmail.com>.
Configuration contains only bean name, not bean itself, so it has to be
provided explicitly on every node. Reasoning behind this is that cache store
implementation is rarely can be serialized.

On the client node cache store is needed for transactional caches, because
in this mode store is updated from a transaction coordinator which is
usually a client. For atomic caches this is actually not required, but
configuration validity checks are the same. I would recommend to use the
same configuration on both servers and clients unless there is a particular
reason to do otherwise. This will simplify the process.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-requires-DataSource-bean-configuration-copy-tp15491p15523.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.