Hi,

Cache is stateful object and has the same lifecycle as Ignite instance.
That is, when Ignite node is stopped you cannot use cache any more. There
is nothing wrong with *static* keyword as long as you know that parent
Ignite node will be alive throughout the whole life of the process.

Probably you stop Ignite instance at some point leaving static variable in
inconsistent state.

Vladimir.

On Mon, Mar 14, 2016 at 4:23 AM, ght230 <[email protected]> wrote:

> I changed the cache variable declarations in the class from "private static
> IgniteCache<String, Integer>" to "private IgniteCache<String, Integer>"
> last
> friday, it worked!
>
> It had been worked more than 2 day and nothing abnormal.
>
> We can not declare the cache variable as "static"?
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/java-lang-IllegalStateException-Cache-has-been-stopped-tp3389p3478.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to