[Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-4228 Preferred master node for HASingleton
by galder.zamarreno@jboss.com
This came out of a discussion with Brian:
HASingletonElectionPolicy should only contain methods that actually called from the HASingletonSupport/HASingletonController classes so that they can inject attributes to the election policy that users don't have to specify in the ha singleton election policy bean definition.Therefore,
/**
| * Sets the preferred master node. As long as the preferred master node
| * presents in the cluster, it will be always selected as master node,
| * no matter what the election policy is.
| * @param node String format of ip_address:port_number
| */
| void setPreferredMaster(String node);
|
| String getPreferredMaster();
methods should not live in HASingletonElectionPolicy, but instead in HASingletonElectionPolicySimple. They could be defined by HASingletonElectionPolicySimpleMBean and implemented by HASingletonElectionPolicySimple, depending whether it makes sense to be accessible and potentially modified at runtime.
Shall I reopen JBAS-4228 or create a new JIRA? If agreed, the change will happen for JBoss 5. What do we wanna do about 4.2? Leave it as it is?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121438#4121438
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121438
18 years, 2 months
[Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-4919 - ha singletons in heterogenous topologies
by galder.zamarreno@jboss.com
I've switched to pickSingleton(List) and managed to get the singleton election tests running successfully again. A few notes/questions:
1.- I could do with having a method in DRM like this:
public List<ClusterNode> lookupReplicantsNodes(String key);
And deprecate lookupReplicantsNodeNames() as it returns a List of String names, which could still be accessible via ClusterNode.getName().
Otherwise, building the List is inefficient. I have to take the singleton name, look up the List of Cluster Node names, and with that list, take ClusterNode list from the partition and match them to create a brand new ClusterNode list with the nodes where the singleton are running. ugh
2.- The code did not inject the ha partition and singleton name into the election policy. I have done this by overriding HASingletonSupport.startService() and assign before super.startService(). I have my doubts whether this is the best place to do this, so feel free to flame me:
@Override
| protected void startService() throws Exception
| {
| if (mElectionPolicyMB != null)
| {
| mElectionPolicyMB.setHAPartition(getHAPartition());
| mElectionPolicyMB.setSingletonName(getServiceHAName());
| }
|
| super.startService();
| }
3.- HASingletonSupport does not have access to the singleton object, but we could override startService in HASC again and do something like:
@Override
| protected void startService() throws Exception
| {
| if (getElectionPolicy() != null)
| {
| getElectionPolicy.setSingletonObject(mSingleton);
| }
|
| super.startService();
| }
4.- TODO: Might be worth creating a test with 3 cluster nodes and have a singleton deployed in two.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121436#4121436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121436
18 years, 2 months
[Design of JBoss Tools (dev)] - Re: JBoss AS - Starting, Stopping, Polling in AS 5
by rob.stryker@jboss.com
Example Full command from command line:
/home/rob/apps/java/jdk1.6.0_02/bin/java -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/home/rob/apps/jboss/jboss-4.2.0.GA/lib/endorsed -classpath /home/rob/apps/jboss/jboss-4.2.0.GA/bin/run.jar:/home/rob/apps/java/jdk1.6.0_02/lib/tools.jar org.jboss.Main
>>The question is, what builds the full java command to launch the server?
In the tooling? heh... as of now nothing. The closest we come to building a full command is making sure IPv4Stack is preferred where it needs to be. I'll make a JIRA to make sure I add an API for complete script mimicking.
>he jmx access to the DeploymentScanner does not exist as that bean is gone, and it would not work across server restarts since the change would not be persisted by default.
Our main use case here is to be able to stop the server from scanning, then we update our exploded deployed application incrementally without the server recognizing only half the changes, and then let the server resume scanning. If there'll be another way to do it in JBoss 5, that'd be great, but the primary goal is that the server doesn't try to reload an updating application while it's still being changed by us.
Also, a way, either through JMX or some other method, to determine when the application has been completely loaded by the server, so that our tools can automatically open the web page for it. RIght now we open the web page right after we deploy, but often times the server hasn't reloaded the app yet and the user gets an unchanged page or an error page.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121414#4121414
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121414
18 years, 2 months