I am sorry, I forgot the attachment.
I attached the diff.
Thanks.
Regards,
Bongjae Chang
----- Original Message -----
From: Bongjae Chang
To: dev_at_shoal.dev.java.net
Sent: Wednesday, April 28, 2010 5:55 PM
Subject: One GroupManagementService has its own NetworkManager in branches(ABSTRACTING_TRANSPORT), isn't it?
Hi,
For now, several GroupManagementService instances in the same JVM share one NetworkManager instance.
ClusterManager uses AbstractNetworkManager#getInstance(String transport) to get its NetworkManager.
However, AbstractNetworkManager always returns the same NetworkManager instance in the same JVM, because it has static field, ˇ°networkManagerˇ°.
I think it should not be static because there can be a couple of GroupManagementService instances and each of them must have its own NetworkManager instance in a JVM.
i.g.
- When there exist two GMSs which would like to join two different groups in a JVM
- When someone would like to test different transport layers(Jxta, Grizzly, etc...) in a JVM by UnitTest - this is my case. :-)
So I attached the simple diff of AbstractNetworkManager.java which does not use static field for NetworkManager.
What do you think?
Regards,
Bongjae Chang