Start with the CacheFactory API to create a Cache in your application JVM.
If you're running a single node then:

Cache cache = new CacheFactory().create();

If you're running a cluster of multiple nodes, then you should start one or
more Locator processes using GFSH:

gfsh> start locator ...etc...

And then specify the the Locator hostname[port] when you construct your
application's Cache:

import static org.apache.geode.distributed.ConfigurationProperties.*;
Cache cache = new CacheFactory().set(LOCATORS, "hostname[10334]").create();


On Fri, Jan 27, 2017 at 3:04 AM, Bruno Sinkovic <[email protected]>
wrote:

> Dear All,
>
> Do you know if we can start a Cache in a Web Application, under a Servlet
> container? If yes, do we need to run a separate process (with gosh for
> instance) or can the server cache run standalone?
> Would you have Java API code examples to illustrate this case?
>
> Thank you in advance for your prompt support.
>
>
> Kind Regards,
>
> *Bruno Sinkovic*
> Solution Architect
>
> [email protected]
> www.pymma.com
> M: +41.79.397.5976 <+41%2079%20397%2059%2076>
>
>
>
>
>

Reply via email to