--
Please let me know if you have any idea on this.
On Friday, July 26, 2019, Pooja Pandey <pooja.ac...@gmail.com> wrote:
Hi,--I have a java application and during the course of action it gets an Hazelcast client. This hazelcast client causes the creation of a large number of non-daemon threads (~20). We have registered shutdown hook to shutdown the client, however at the end of main(), JVM is not exiting due to these non-daemon threads and since JVM is not exiting the shutdown hook for client doesn't get called. We don't want to call System.exit()/HazelcastClient.shutdownAll() from our main(). I wanted to check if there is any way/setting for Hazelcast client so that it will create daemon threads instead of non-daemon threads.Thanks,Pooja
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/7aeee9da-1463-4615-885d-47a70785369c%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CANy3jCUd3yDm4-4vwPn04N4WppOPz79zsUgjASghk8D8v82GiQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CAEj0St-J4sQ4O2GGNg3eFWCups6Ts5cwhX1-OdV%2BqjLWNqxdZA%40mail.gmail.com.
<dependency> <groupId>org.agrona</groupId> <artifactId>agrona</artifactId> <version>1.0.3</version></dependency>import org.agrona.concurrent.ShutdownSignalBarrier;
public class SomeMain{ public static void main(String[] args) { final ShutdownSignalBarrier barrier=new ShutdownSignalBarrier(); try { // start client 1 // start client 2 // start client 3
// you can also pass the signal down to a client and signal it yourself with barrier.signal() barrier.await(); } finally{ // stop client 3 // stop client 2 // stop client 1 } }}Hi Sancar,Thank you very much for your response. For us calling HazelcastClient.shutdownAll()/client.shutdown() are same as we just have single client, however we have many many applications where we will require to do this change. Ideally we are not preferring to call for shutdown Hazelcast client from applications as Hazelcast client gets created in a deep down infrastructure of our project and we were looking for something where we can handle destruction of the Hazelcast client from internal infrastructure.Thanks,Pooja
On Mon, Jul 29, 2019 at 2:02 PM M. Sancar Koyunlu <san...@hazelcast.com> wrote:
This is by design, both hazelcast member and clients continue to work unless shutdown is called. There is no option to create them as daemon threads.I totally get that calling System.exit()/HazelcastClient.shutdownAll() is not a good option. Why don't you call client.shutdown() when you are done with the client instead of a shutdown hook.
On Mon, Jul 29, 2019 at 5:44 AM Pooja Pandey <pooja.ac...@gmail.com> wrote:
Please let me know if you have any idea on this.
On Friday, July 26, 2019, Pooja Pandey <pooja.ac...@gmail.com> wrote:
Hi,--I have a java application and during the course of action it gets an Hazelcast client. This hazelcast client causes the creation of a large number of non-daemon threads (~20). We have registered shutdown hook to shutdown the client, however at the end of main(), JVM is not exiting due to these non-daemon threads and since JVM is not exiting the shutdown hook for client doesn't get called. We don't want to call System.exit()/HazelcastClient.shutdownAll() from our main(). I wanted to check if there is any way/setting for Hazelcast client so that it will create daemon threads instead of non-daemon threads.Thanks,Pooja
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/7aeee9da-1463-4615-885d-47a70785369c%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CANy3jCUd3yDm4-4vwPn04N4WppOPz79zsUgjASghk8D8v82GiQ%40mail.gmail.com.
----M. Sancar Koyunlu
Software Engineer, Hazelcast
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.
@Servicepublic class HazelcastService {
@PreDestroy
public void preDestroy() {
hazelcastClient.shutdown();
}
}
@Service@DependsOn("HazelcastService")public class SomeService {
}
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/2b26cd50-1b6c-42ef-bb1f-c88575331f7c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/41dd9cc9-a814-4457-9167-a4548f718da8%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/9fd945c7-d091-4462-8888-95beafeaa106%40googlegroups.com.
This is by design, both hazelcast member and clients continue to work unless shutdown is called. There is no option to create them as daemon threads.I totally get that calling System.exit()/HazelcastClient.shutdownAll() is not a good option. Why don't you call client.shutdown() when you are done with the client instead of a shutdown hook.
On Mon, Jul 29, 2019 at 5:44 AM Pooja Pandey <pooja.ac...@gmail.com> wrote:
Please let me know if you have any idea on this.
On Friday, July 26, 2019, Pooja Pandey <pooja.ac...@gmail.com> wrote:
Hi,--I have a java application and during the course of action it gets an Hazelcast client. This hazelcast client causes the creation of a large number of non-daemon threads (~20). We have registered shutdown hook to shutdown the client, however at the end of main(), JVM is not exiting due to these non-daemon threads and since JVM is not exiting the shutdown hook for client doesn't get called. We don't want to call System.exit()/HazelcastClient.shutdownAll() from our main(). I wanted to check if there is any way/setting for Hazelcast client so that it will create daemon threads instead of non-daemon threads.Thanks,Pooja
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/7aeee9da-1463-4615-885d-47a70785369c%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CANy3jCUd3yDm4-4vwPn04N4WppOPz79zsUgjASghk8D8v82GiQ%40mail.gmail.com.
--M. Sancar Koyunlu
Software Engineer, Hazelcast
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CAEj0St-J4sQ4O2GGNg3eFWCups6Ts5cwhX1-OdV%2BqjLWNqxdZA%40mail.gmail.com.
Hi Sancar,Calling client.shutdown()/ HazelcastClient.shutdownAll() from application’s main fixes the issue on Winsows10 and Windows Server 2016 but issue still persists on Windows Server 2012 R2 Standard.Please let me know if you have idea on this OS specific issue.Thanks,Pooja
This is by design, both hazelcast member and clients continue to work unless shutdown is called. There is no option to create them as daemon threads.I totally get that calling System.exit()/HazelcastClient.shutdownAll() is not a good option. Why don't you call client.shutdown() when you are done with the client instead of a shutdown hook.
On Mon, Jul 29, 2019 at 5:44 AM Pooja Pandey <pooja.ac...@gmail.com> wrote:
Please let me know if you have any idea on this.
On Friday, July 26, 2019, Pooja Pandey <pooja.ac...@gmail.com> wrote:
Hi,--I have a java application and during the course of action it gets an Hazelcast client. This hazelcast client causes the creation of a large number of non-daemon threads (~20). We have registered shutdown hook to shutdown the client, however at the end of main(), JVM is not exiting due to these non-daemon threads and since JVM is not exiting the shutdown hook for client doesn't get called. We don't want to call System.exit()/HazelcastClient.shutdownAll() from our main(). I wanted to check if there is any way/setting for Hazelcast client so that it will create daemon threads instead of non-daemon threads.Thanks,Pooja
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/7aeee9da-1463-4615-885d-47a70785369c%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CANy3jCUd3yDm4-4vwPn04N4WppOPz79zsUgjASghk8D8v82GiQ%40mail.gmail.com.
----M. Sancar Koyunlu
Software Engineer, Hazelcast
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CAEj0St-J4sQ4O2GGNg3eFWCups6Ts5cwhX1-OdV%2BqjLWNqxdZA%40mail.gmail.com.
Hi Sancar,Calling client.shutdown()/ HazelcastClient.shutdownAll() from application’s main fixes the issue on Winsows10 and Windows Server 2016 but issue still persists on Windows Server 2012 R2 Standard.Please let me know if you have idea on this OS specific issue.Thanks,Pooja
This is by design, both hazelcast member and clients continue to work unless shutdown is called. There is no option to create them as daemon threads.I totally get that calling System.exit()/HazelcastClient.shutdownAll() is not a good option. Why don't you call client.shutdown() when you are done with the client instead of a shutdown hook.
On Mon, Jul 29, 2019 at 5:44 AM Pooja Pandey <pooja.ac...@gmail.com> wrote:
Please let me know if you have any idea on this.
On Friday, July 26, 2019, Pooja Pandey <pooja.ac...@gmail.com> wrote:
Hi,--I have a java application and during the course of action it gets an Hazelcast client. This hazelcast client causes the creation of a large number of non-daemon threads (~20). We have registered shutdown hook to shutdown the client, however at the end of main(), JVM is not exiting due to these non-daemon threads and since JVM is not exiting the shutdown hook for client doesn't get called. We don't want to call System.exit()/HazelcastClient.shutdownAll() from our main(). I wanted to check if there is any way/setting for Hazelcast client so that it will create daemon threads instead of non-daemon threads.Thanks,Pooja
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/7aeee9da-1463-4615-885d-47a70785369c%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/CANy3jCUd3yDm4-4vwPn04N4WppOPz79zsUgjASghk8D8v82GiQ%40mail.gmail.com.
----M. Sancar Koyunlu
Software Engineer, Hazelcast
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haze...@googlegroups.com.