-
1. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
galder.zamarreno Jan 9, 2019 10:53 AM (in response to dariosanna)You can probably still get to Transport via AdvancedCache.getComponentRegistry().getGlobalComponentRegistry().getComponent(Transport.class)
Alternatively, getPhysicalAddresses JMX (CacheManager MBean)
@Tristan, shall we leave room for this somewhere else?
Btw, what are you doing with this exactly?
-
2. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
dariosanna Jan 28, 2019 2:55 PM (in response to galder.zamarreno)Hi Galder, thanks - works!
I use it to get the physical addresses simply to have an overview on the nodes configuration (e.g. network address and port)
-
3. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
dariosanna Jan 28, 2019 2:56 PM (in response to galder.zamarreno)ups, GlobalComponentRegistry().getComponent() is also deprecated ???
-
4. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
galder.zamarreno Jan 30, 2019 11:28 AM (in response to dariosanna)AbstractComponentRegistry is deprecated, but GlobalComponentRegistry implements BasicComponentRegistry, where getComponent is defined, and that's not deprecated.
-
5. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
dariosanna Feb 9, 2019 3:33 AM (in response to galder.zamarreno)Sorry, but the current Infinispan (9.4.6) has the following code:
- org.infinispan.factories.GlobalComponentRegistry extends AbstractComponentRegistry (AbstractComonentRegistriy is deprecated)
my code:
* EmbeddedCacheManager cacheManager = ...
* cacheManager.getGlobalComponentRegistry ().getComponent(Transport.class); // here getComponent() is deprecatet
GlobalComponentRegistry does not implement BasicComponentRegistry, ist simply extends AbstractComponentRegistry.
May be im totaly wrong, but i can not find the code your mention.
-
6. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
galder.zamarreno Feb 27, 2019 5:28 AM (in response to dariosanna)Well, has access to BasicComponentRegistry: infinispan/AbstractComponentRegistry.java at 9.4.6.Final · infinispan/infinispan · GitHub
-
7. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
dariosanna Mar 26, 2019 12:29 PM (in response to galder.zamarreno)Hi Galder,
please give me an working code snippet, starting from EmbeddedCacheManager to getPhysicalAddresses().
thanks
-
8. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
galder.zamarreno Apr 9, 2019 5:16 AM (in response to dariosanna)LOL, my previous comment already had it:
EmbeddedCacheManager cm1 = ...
Transport t = cm1.getGlobalComponentRegistry().getComponent(Transport.class);
System.out.println(t.getPhysicalAddresses());
-
9. Re: CacheManager getTransport() deprecated sinze 9.4.2 ? How to retrieve getPhysicalAddresses() ?
dariosanna Apr 10, 2019 5:46 AM (in response to galder.zamarreno)Hello Galder, your LOL does again not solve the mentionend deprerated problem!
Your snipped "Transport t = cm1.getGlobalComponentRegistry().getComponent(Transport.class);" results in:
- The method getComponent(Class<Transport>) from the type AbstractComponentRegistry is deprecated
Infinispan 10.0.0Beta3 and also Infinispan 9.4.x.
Please make it possible to get Transport without using a deprecated method.
Thank you.