You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Jean-Philippe Laroche <jp...@gmail.com> on 2019/07/25 16:41:39 UTC

Invoking an entry processor from a CacheInterceptorAdapter

 I am trying to reference a cache from within a CacheInterceptorAdapter
(onAfterPut method) to invoke an entry processor to another cache after a
put.

How to get a refrence to a cache?

I tried the followings:


Ignite ignite = Ignition.start("default-config.xml");
IgniteCache<Integer, Address> cache =
ignite.getOrCreateCache("MyOtherCache");

or

IgniteCache<Integer, Address> cache =
ignite.start().getOrCreateCache("MyOtherCache");

But it fails:


class org.apache.ignite.IgniteCheckedException: Ignite instance with this
name has already been started: gridgain-cluster

Re: Invoking an entry processor from a CacheInterceptorAdapter

Posted by Alexander Kor <al...@gmail.com>.
 This message means that you are trying to start two ignite instances in
the same JVM with the same
  igniteInstanceName in your configuration.


https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/IgniteConfiguration.html#setIgniteInstanceName-java.lang.String-

  Check your configuration file for this property.

On Thu, Jul 25, 2019 at 12:41 PM Jean-Philippe Laroche <
jplaroche.2017@gmail.com> wrote:

>  I am trying to reference a cache from within a CacheInterceptorAdapter
> (onAfterPut method) to invoke an entry processor to another cache after a
> put.
>
> How to get a refrence to a cache?
>
> I tried the followings:
>
>
> Ignite ignite = Ignition.start("default-config.xml");
> IgniteCache<Integer, Address> cache =
> ignite.getOrCreateCache("MyOtherCache");
>
> or
>
> IgniteCache<Integer, Address> cache =
> ignite.start().getOrCreateCache("MyOtherCache");
>
> But it fails:
>
>
> class org.apache.ignite.IgniteCheckedException: Ignite instance with this
> name has already been started: gridgain-cluster
>