You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by wt <wa...@gmail.com> on 2018/08/21 13:25:34 UTC
ignite.net config (applying spring and .net config)
Hi
I am trying to work out if i can start ignite using the spring config but
then register a custom .net plugin through .net but i can't find any
documentation on how this can be done apart from this section from the
following documentation (see in bold for the specific reference to this)
https://apacheignite-net.readme.io/docs/configuration
/Spring XML
Spring XML allows native java-based Ignite configuration. Spring config file
can be provided via Ignition.Start(string) method and
IgniteConfiguration.SpringConfigUrl property.
When IgniteConfiguration.SpringConfigUrl property is used, Spring config is
loaded first, *and other IgniteConfiguration properties are applied on top
of it.* This is useful when some Java property is not supported in
Ignite.NET directly./
What i would like to know is how can i register a plugin using .net classes
i have written after i have started the services with this code
/ var r = Ignition.Start(@"C:\ignite_rmdbs.xml");
r.GetCluster().SetActive(true);
/
There is a useful plugin example but it is referring to a .net plugin that
calls an existing java plugin. The problem is in that example the config is
all done in .net. I have searched around and not getting much luck with an
example of this if it is possible.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: ignite.net config (applying spring and .net config)
Posted by wt <wa...@gmail.com>.
Brilliant thanks a million Ilya. pts working with the plugin
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: ignite.net config (applying spring and .net config)
Posted by wt <wa...@gmail.com>.
by the way i am doing all this in Java
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: ignite.net config (applying spring and .net config)
Posted by wt <wa...@gmail.com>.
Super, that looks like the solution. Thank you so much for this. It's been so
difficult navigating without complete documentation. Will give it a whirl.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: ignite.net config (applying spring and .net config)
Posted by wt <wa...@gmail.com>.
Its working - Thanks a million Ilya
Regards
Wayne
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: ignite.net config (applying spring and .net config)
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
I think you should be using
IgniteConfiguration cfg = Ignition.loadSpringBean(/* rel path, abs path or
url */ "server.xml", /* bean name */"grid.cfg");
TcpDiscoverySpi spi = new TcpDiscoverySpi();
spi.setAuthenticator(new CustomSecurityProcessor());
cfg.setDiscoverySpi( spi);
Ignition.start(cfg);
Regards,
--
Ilya Kasnacheev
чт, 30 авг. 2018 г. в 17:11, wt <wa...@gmail.com>:
> I need to use the web console for rmdbs integration so i am using the
> config
> file that is generated and the project. What i am busy working on is
> writing
> a custom plugin that authenticates users. I need to setDiscoverySpi with
> the
> new authenticator but there doesn't seem to be a method in the config class
> that allows me to load up a config file into a configuration object. I
> have
> managed to get teh configuration file passed by calling
>
> IgnitionEx.loadConfigurations("server.xml");
>
> but it returns org.apache.ignite.lang.IgniteBiTuple and there doesn't seem
> to be a method that creates a configuration object off this.
>
> So i have 2 questions:
>
> if i do something like this will Ignite recognize the change
>
> TcpDiscoverySpi spi = new TcpDiscoverySpi();
> Ignite ig = Ignition.start("server.xml");
> IgniteConfiguration cfg = ig.configuration();
> spi.setAuthenticator(new CustomSecurityProcessor());
> cfg.setDiscoverySpi( spi);
> ig.cluster().active(true);
>
>
> or is there another way i can load up the config file and then set
> additional configuration properties before i then parse that config object
> to Ignition.start
>
>
> Thanks for your time.
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: ignite.net config (applying spring and .net config)
Posted by wt <wa...@gmail.com>.
I need to use the web console for rmdbs integration so i am using the config
file that is generated and the project. What i am busy working on is writing
a custom plugin that authenticates users. I need to setDiscoverySpi with the
new authenticator but there doesn't seem to be a method in the config class
that allows me to load up a config file into a configuration object. I have
managed to get teh configuration file passed by calling
IgnitionEx.loadConfigurations("server.xml");
but it returns org.apache.ignite.lang.IgniteBiTuple and there doesn't seem
to be a method that creates a configuration object off this.
So i have 2 questions:
if i do something like this will Ignite recognize the change
TcpDiscoverySpi spi = new TcpDiscoverySpi();
Ignite ig = Ignition.start("server.xml");
IgniteConfiguration cfg = ig.configuration();
spi.setAuthenticator(new CustomSecurityProcessor());
cfg.setDiscoverySpi( spi);
ig.cluster().active(true);
or is there another way i can load up the config file and then set
additional configuration properties before i then parse that config object
to Ignition.start
Thanks for your time.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: ignite.net config (applying spring and .net config)
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Can you please elaborate which settings you want to transfer to Java?
Note that you do have to configure binary marshaller in Java to use it
together with .Net:
https://apacheignite-net.readme.io/docs/platform-interoperability
Regards,
--
Ilya Kasnacheev
чт, 30 авг. 2018 г. в 11:05, wt <wa...@gmail.com>:
> hi Ilya
>
> Is there a way to do this in java?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: ignite.net config (applying spring and .net config)
Posted by wt <wa...@gmail.com>.
hi Ilya
Is there a way to do this in java?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: ignite.net config (applying spring and .net config)
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Here's the sample snippet:
var cfg = new IgniteConfiguration()
{
SpringConfigUrl = "ignite-config.xml",
BinaryConfiguration = new
BinaryConfiguration
{
NameMapper = new
BinaryBasicNameMapper { IsSimpleName = true }
}
// Set other properties here
};
Regards,
--
Ilya Kasnacheev
2018-08-21 16:25 GMT+03:00 wt <wa...@gmail.com>:
> Hi
>
> I am trying to work out if i can start ignite using the spring config but
> then register a custom .net plugin through .net but i can't find any
> documentation on how this can be done apart from this section from the
> following documentation (see in bold for the specific reference to this)
>
> https://apacheignite-net.readme.io/docs/configuration
>
> /Spring XML
> Spring XML allows native java-based Ignite configuration. Spring config
> file
> can be provided via Ignition.Start(string) method and
> IgniteConfiguration.SpringConfigUrl property.
>
> When IgniteConfiguration.SpringConfigUrl property is used, Spring config
> is
> loaded first, *and other IgniteConfiguration properties are applied on top
> of it.* This is useful when some Java property is not supported in
> Ignite.NET directly./
>
> What i would like to know is how can i register a plugin using .net classes
> i have written after i have started the services with this code
>
>
> / var r = Ignition.Start(@"C:\ignite_rmdbs.xml");
>
> r.GetCluster().SetActive(true);
> /
>
> There is a useful plugin example but it is referring to a .net plugin that
> calls an existing java plugin. The problem is in that example the config is
> all done in .net. I have searched around and not getting much luck with an
> example of this if it is possible.
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>