[Clustering/JBoss] - Instances of JBoss in different machines
by viswanadhvk
Hi all, I would like to set up multiple instances of JBoss in different machines.
I mean to say, I want to creat 1 node in my machine, and another node (say node2) in another machine, and want to pull them into cluster.
Please help me out any link or any steps to do that. I didn't find information regarding this in "http://www.jboss.org/wiki/Wiki.jsp?page=JBossHA".
Let me briefly explain you, what I did .
I am using windows XP , and JBoss 4.2.1.
(1) I changed DefaultPartition to TestPartition at " all\deploy\cluster-service.xml "
|
| <server>
|
| <!-- ==================================================================== -->
| <!-- Cluster Partition: defines cluster -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.ha.framework.server.ClusterPartition"
| name="jboss:service=${jboss.partition.name:TestPartition}">
|
| <!-- Name of the partition being built -->
| <attribute name="PartitionName">${jboss.partition.name:TestPartition}</attribute>
|
|
|
(2) Even though I am NOT using SFSB (Stateful Session Bean) .
I modified the below code at cluster-service.xml for "SFSB"
changed DefaultPartition to TestPartition
|
|
| <!-- ==================================================================== -->
| <!-- HA Session State Service for SFSB -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.ha.hasessionstate.server.HASessionStateService"
| name="jboss:service=HASessionState">
| <depends>jboss:service=Naming</depends>
| <!-- We now inject the partition into the HAJNDI service instead
| of requiring that the partition name be passed -->
| <depends optional-attribute-name="ClusterPartition"
| proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
| <!-- JNDI name under which the service is bound -->
| <attribute name="JndiName">/HASessionState/Default</attribute>
| <!-- Max delay before cleaning unreclaimed state.
| Defaults to 30*60*1000 => 30 minutes -->
| <attribute name="BeanCleaningDelay">0</attribute>
| </mbean>
|
|
(3)I modified the "HA-JNDI" also at cluster-service.xml
changed DefaultPartition to TestPartition
|
| <!-- ==================================================================== -->
| <!-- HA JNDI -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.ha.jndi.HANamingService"
| name="jboss:service=HAJNDI">
| <!-- We now inject the partition into the HAJNDI service instead
| of requiring that the partition name be passed -->
| <depends optional-attribute-name="ClusterPartition"
| proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
| <!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
| <!-- Port on which the HA-JNDI stub is made available -->
|
|
|
(4) I modified at the "HA-Invokers"
changed DefaultPartition to TestPartition
|
| <!-- ==================================================================== -->
| <!-- HA Invokers -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.invocation.unified.server.UnifiedInvokerHA"
| name="jboss:service=invoker,type=unifiedha">
| <depends>jboss:service=TransactionManager</depends>
| <depends optional-attribute-name="Connector"
| proxy-type="attribute">jboss.remoting:service=Connector,transport=socket</depends>
| <depends>jboss:service=${jboss.partition.name:TestPartition}</depends>
| </mbean>
|
|
|
(5) I changed at "Distributed cache invalidation"
|
| <!-- ==================================================================== -->
| <!-- Distributed cache invalidation -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.cache.invalidation.bridges.JGCacheInvalidationBridge"
| name="jboss.cache:service=InvalidationBridge,type=JavaGroups">
| <!-- We now inject the partition into the HAJNDI service instead
| of requiring that the partition name be passed -->
| <depends optional-attribute-name="ClusterPartition"
| proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
| <depends>jboss.cache:service=InvalidationManager</depends>
| <attribute name="InvalidationManager">jboss.cache:service=InvalidationManager</attribute>
| <attribute name="BridgeName">DefaultJGBridge</attribute>
| </mbean>
|
|
|
in all the above places I changed the name of the partition name. I changed from DefaultPartition to TestPartition, thats it. Other than that I haven't changed any thing.
(6) I changed another file called farm-service.xml
which is at "I changed all\deploy\deploy.last\farm-service.xml"
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- Sample Farming Service Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <server>
|
| <mbean code="org.jboss.ha.framework.server.FarmMemberService"
| name="jboss:service=FarmMember,partition=${jboss.partition.name:TestPartition}" >
|
| <!-- We now inject the partition into the HAJNDI service instead
| of requiring that the partition name be passed -->
| <depends optional-attribute-name="ClusterPartition"
| proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
|
| <depends>jboss.web:service=WebServer</depends>
|
|
|
(7) I changed this file also
deploy-hasingleton-service.xml which is at all\deploy\
If I won't change this file , JBoss server showing error message as this Partition (defaultPartition)that it is not deployed yet in the server.So I need to change this.
|
| <server>
|
| <!--
| |
| | Use the deployer service on the singleton node.
| |
| -->
| <mbean code="org.jboss.ha.singleton.HASingletonController"
| name="jboss.ha:service=HASingletonDeployer">
| <!-- We now inject the partition into the HAJNDI service instead
| of requiring that the partition name be passed -->
| <depends optional-attribute-name="ClusterPartition"
| proxy-type="attribute">jboss:service=${jboss.partition.name:TestPartition}</depends>
|
|
|
In the above files also I changed only name of the 'partition' from 'DefaultPartition' to 'TestPartition'
I did the same changes in 2nd machine also.
Next I started both the machines (one after another, may be 30 secs gap)
with the below command.
|
|
| run.bat -g ,partition name -u <multicast address> -b <this machine IPaddress> -c all
|
| run.bat -g TestPartition -u 228.1.2.3 -b 166.35.136.77 -c all
|
|
Same I did for 2nd machine also, Of course IP address of that machine.
mcast-address and partition names both are same for both machines.
But both are NOT recognizing each other.
I also re-started the machines with different start up commands but in vain.
these are the start up commands
|
|
| run.bat -g TestPartition -u 228.1.2.3 -b CUSTXIRVMRWW5GG -c all
|
|
| run.bat -b 166.35.136.77 -c all --partition=TestPartition -u 228.1.2.3
|
|
|
Can any body suggest me , what I need to do more. Or please suggest me am I doing any mistake any where.
Thanks!
Viswanadh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113887#4113887
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113887
18 years, 4 months
[JBoss Seam] - EL changes according to JSF 1.2
by Newlukai
Hi,
since the JBoss Tools 2 are available we decided to upgrade our Seam 1.2.1 based application to Seam 2.0.
I had and still have to fiddle with JBossTools to deploy my app, but this is another problem.
I made all the changes described in seam2migration.txt regarding the configuration files. Now I'm stuck on the coding part. With JSF 1.2 the EL is changed and the class MethodBinding was replaced by MethodExpression. I use a menu provided by ICEfaces for the navigation in my app. Since I have normal links that return navigation strings AND menu items that should invoke a method I wrote sth like this:
if(link.charAt(0) == '#' && facesContext != null) {
| menuItem.setAction(new ActionParamMethodBinding(facesContext.getApplication(), link));
| } else {
| menuItem.setAction(new ActionMethodBinding(link));
| }
All links that had to invoke a method have a preceding '#'. if this is the case the action of this link is an object of the Seam class ActionParamMethodBinding.
But as you can guess this class is gone. How can I implement the behaviour I had with the new versions of Seam and JSF?
BTW: Is there any document where one can see how to create a Seam Dynamic Web Project with Eclipse, which jars have to be included and how to deploy and test it? And how to configure Seam 2.0 with ICEfaces 1.6.2?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113875#4113875
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113875
18 years, 4 months