You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by tomk <rr...@gmail.com> on 2016/04/15 11:59:35 UTC

It it possible to eleminate CacheConfiguration from code java ?

Hello,
In my java code I am using CacheConfiguration to configure such things as
cache name, data source (jdbc connection).
Is it possible to eleminate this object from java code ? In place of them, I
would like to create setting file (xml).



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: It it possible to eleminate CacheConfiguration from code java ?

Posted by Alexey Kuznetsov <ak...@gridgain.com>.
Hi, @tomk!

In addition to Denis answer, I would like to suggest to try WebConsole, see
https://ignite.apache.org/addons.html#web-console

Web Console will generate XML and Java code, pom file and many more.


On Fri, Apr 15, 2016 at 5:23 PM, Denis Magda <dm...@gridgain.com> wrote:

> Hi,
>
> Sure, you can configure your caches in Spring xml configuration.
> You can refer to this exemplary configuration
>
> https://github.com/apache/ignite/blob/master/examples/config/example-cache.xml
>
> —
> Denis
>
> > On Apr 15, 2016, at 12:59 PM, tomk <rr...@gmail.com> wrote:
> >
> > Hello,
> > In my java code I am using CacheConfiguration to configure such things as
> > cache name, data source (jdbc connection).
> > Is it possible to eleminate this object from java code ? In place of
> them, I
> > would like to create setting file (xml).
> >
> >
> >
> > --
> > View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214.html
> > Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
>


-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Re: It it possible to eleminate CacheConfiguration from code java ?

Posted by Denis Magda <dm...@gridgain.com>.
Hi, 

Sure, you can configure your caches in Spring xml configuration.
You can refer to this exemplary configuration
https://github.com/apache/ignite/blob/master/examples/config/example-cache.xml

—
Denis

> On Apr 15, 2016, at 12:59 PM, tomk <rr...@gmail.com> wrote:
> 
> Hello,
> In my java code I am using CacheConfiguration to configure such things as
> cache name, data source (jdbc connection).
> Is it possible to eleminate this object from java code ? In place of them, I
> would like to create setting file (xml).
> 
> 
> 
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: It it possible to eleminate CacheConfiguration from code java ?

Posted by vkulichenko <va...@gmail.com>.
You don't need to create Ignite instance on the server node, it's already
there.

On the client do like this:

Ignition.setClientMode(true);
Ignite ignite = Ignition.start(...);

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214p4232.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: It it possible to eleminate CacheConfiguration from code java ?

Posted by tomk <rr...@gmail.com>.
I tried to search there.  My problem is, that each my app is in client mode.
Server is runned using ./bin/ignite.sh



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214p4222.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: It it possible to eleminate CacheConfiguration from code java ?

Posted by Denis Magda <dm...@gridgain.com>.
I would suggest you start learning Apache Ignite using its examples [1] that showcase how to start node, organize cluster, use caches, computer, queries, etc.

[1] https://github.com/apache/ignite/tree/master/examples

—
Denis

> On Apr 15, 2016, at 1:38 PM, tomk <rr...@gmail.com> wrote:
> 
> Ok, I will show this webconsole.
> When it comes to flow in my code - could you refert to this issue ?
> As you know-  for example I don't know where should I create instance of
> Ignite class.
> 
> PS xmls files allow me totally eleminate configuration cache from java code
> ?
> 
> 
> 
> --
> View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214p4219.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: It it possible to eleminate CacheConfiguration from code java ?

Posted by tomk <rr...@gmail.com>.
Ok, I will show this webconsole.
When it comes to flow in my code - could you refert to this issue ?
As you know-  for example I don't know where should I create instance of
Ignite class.

PS xmls files allow me totally eleminate configuration cache from java code
?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/It-it-possible-to-eleminate-CacheConfiguration-from-code-java-tp4214p4219.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.