ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Cummings <joshcummi...@workfront.com>
Subject Re: Getting a cluster-configured JCache CacheManager instance
Date Thu, 29 Sep 2016 15:30:18 GMT
Here is what I did to satisfy our requirement:

System.setProperty("ignite.zookeeper.host",
resolvePropertyFromCentralizedRepo);
Caching.getCachingProvider(...).getCacheManager(springCfgUrl,
someClassLoader, someProps);

And then use the PropertyPlaceholderConfigurer and a placeholder in the xml
as you suggested.


On Wed, Sep 28, 2016 at 8:32 AM, Josh Cummings <joshcummings@workfront.com>
wrote:

> Okay, thanks, I'll try that. Along similar lines, is there a way for me to
> bring up an Ignite client, say programmatically, give it a name, and then
> send just the grid name through the JCache API?
>
> Not trying to make Ignite behave just like Hazelcast, but just to make my
> thoughts clear with an example, there I can do this:
>
> Properties properties = new Properties();
> properties.setProperty("hazelcast.instance.name", "my-instance-name");
> Caching.getCachingProvider().getCacheManager(someUri, someClassLoader,
> properties);
>
> And it will pick up a client I've already configured elsewhere in the
> runtime by the name of "my-instance-name".
>
> Is there a way to identify an already configured client through the JCache
> API?
>
> Thanks, again.
>
>
>
> On Tue, Sep 27, 2016 at 4:40 PM, vkulichenko <
> valentin.kulichenko@gmail.com> wrote:
>
>> Hi Josh,
>>
>> Ignite uses Spring for configuration, so you can utilize Spring property
>> placeholder.You can find a nice example here:
>> https://www.mkyong.com/spring/spring-propertyplaceholderconf
>> igurer-example/
>>
>> You can also use one of the shared IP finders provided by Ignite. Shared
>> here means that each node that joins the topology will leave its
>> coordinates
>> in some shared storage, so that other nodes always know where to connect.
>> With this approach you will not have to explicitly specify addresses at
>> all.
>> Here is the list of all available IP finders (only static IP based is not
>> shared): https://apacheignite.readme.io/docs/cluster-config
>>
>> -Val
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/Getting-a-cluster-configured-JCache-CacheMa
>> nager-instance-tp7970p7978.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>
>
> --
>
> *JOSH CUMMINGS*
>
> Principal Engineer
>
> [image: Workfront] <https://www.workfront.com/>
>
> *O*  801.477.1234  |  *M*  8015562751
>
> joshcummings@workfront.com | www.workfront.com
> Address <https://www.workfront.com/contact-us/>  |  Twitter
> <http://twitter.com/Workfront_Inc>  |  LinkedIn
> <http://www.linkedin.com/company/48453>  |  Facebook
> <http://www.facebook.com/workfront>
>
> [image: Workfront] <https://www.workfront.com/email-promo>
>



-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] <https://www.workfront.com/>

*O*  801.477.1234  |  *M*  8015562751

joshcummings@workfront.com | www.workfront.com
Address <https://www.workfront.com/contact-us/>  |  Twitter
<http://twitter.com/Workfront_Inc>  |  LinkedIn
<http://www.linkedin.com/company/48453>  |  Facebook
<http://www.facebook.com/workfront>

[image: Workfront] <https://www.workfront.com/email-promo>

Mime
View raw message