Re: [jgroups-users] Migration to 4.0.4 with JDBC_PING
Questions/problems related to using JGroups <[email protected]> Wed, 28 Jun 2017 16:43:25 +0200
| Newsgroups | gmane.comp.java.javagroups.general |
|---|---|
| Message-ID | <mailman.9403.1498661017.24383.javagroups-users@lists.sourceforge.net> |
On 28/06/17 15:21, Questions/problems related to using JGroups wrote: > Hi, > > We are trying to migrate to the latest release 4.0.4 and facing problems > with JDBC_PING. > > The same scenario used to work for us while using 3.6.13 release version but > not version 4. We gracefully shutdown the nodes using spring - close the > channel and rpc dispatcher and I see that the stop on the jdbc ping protocol > is called but does not clean up the records. What do you mean? JDBC_PING.stop() should remove the row *only* for the specific member that's stopped gracefully. If you want different behavior, you can experiment with attributes remove_old_coords_on_view_change or remove_all_data_on_view_change. Consult the manual for details. > Is there a way to clean up records ourselves rather than going over jdbc. And also we will not have the > unique I'd to clean up. At least in this case we are trying to close the > entire cluster between the junit runs. Teardown. If the above doesn't help, can't you just clear the table via JDBC? > The "register_shutdown_hook" from FILE_PING is on Java process and we need > an ability to remove it during the teardown. Is there a way to get hold of > the protocol and stop it ourselves. Yes: JChannel ch; JDBC_PING jdbc_ping=ch.getProtocolStack.findProtocol(JDBC_PING.class); jdbc_ping.stop(); There's a bunch of protected methods like removeAll() or clearTable(), so you'd have to subclass or use reflection to invoke them. > This behavior is causing issues with the subsequent tests as there is a node > still available in the database from the previous run and the cluster is not > able to elect the coordinator as the channel is closed (connection > exceptions) for the node from previous run. > > Could you please let us know if we have to change something with V4 to > achieve the same behavior as in with v3. > > > Thanks > > > > -- > View this message in context: http://jgroups.1086181.n5.nabble.com/Migration-to-4-0-4-with-JDBC-PING-tp11329.html > Sent from the JGroups - General mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > javagroups-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/javagroups-users > -- Bela Ban | http://www.jgroups.org ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot