[Clustering/JBoss] - Implementation JMS Failover (Clustring) In jBoss 4.2.3 GA
by sjunejo
Hi All,
I search through internet and this forum but couldn't find a complete guid through which I can even start. Some of the documents mention on 'Home Page' of jBoss Clustring talking about some cluster-service.xml and cluster folder in my deploy directiry but i dont have anything here.....can anyone please provide me some inof on how to setup a clusterw ith four jboss server instances. I am attaching a failover diagram in this post for better understanding.
[img]http://img37.imageshack.us/i/ideak.png/%5D%5BIMG%5Dhttp://img37.imageshack.us/img37/962/ideak.th.png[/img]
Server 1 and Server 2 will hold my Web Application and possible targets of each other in case of failure where Server 3 and Server 4 will hold my Message MDB and possible targets for each other in case of failure. All three Queues should be distributed destinations cluster wide.
FYI: I have already implemeted the same using WebLogic 10.3.
Is it going to be simillar using jBoss.
Your help will be appreciated.
Thanks & Regards,
Sheeraz
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240774#4240774
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240774
14 years, 11 months
[JBoss Cache: Core Edition] - Re: How does JBoss Cache perform with high (15-20) number of
by bela@jboss.com
So I'm assuming we have a 20 node cluster, and every node sends 25KBytes/sec (25 KBytes == 200KBits).
When using UDP, every node sends 1 multicast packet, to be received by every other node. So you scenario above (15x15) doesn't apply.
When using TCP, every node sends a message N-1 (19) times, so your scenario *does* apply in this case.
With respect to network bandwidth, sending is not the issue because every node has a full duplex line to the switch.
However, when receiving, a line from the switch to a node has to be shared between 19 (N-1) instances. In other words, every node can receive concurrent traffic from the 19 other nodes.
So if you have a 1GB switch, then the effective rate / node is 1000MBits/19 = 52MBits = 52'000KBits = 6'500KBytes /sec. That 260 times more that you need !
So this is peanuts traffic-wise. The bottleneck might lie somewhere else, namely in the data: when everyone replicates its date to everybody else, every node has to store DATA * 20 on average. So if every node has data of 1MB, then the avg data size on a node is 20MB. This is fine, but of course not scalable if (1) your avg data size increases or (2) your cluster size increases.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240771#4240771
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240771
14 years, 11 months
[EJB 3.0] - Re: flushing EJB3 for use with EJB2.1
by robert.geisler
some update here...
we are almost done with our ejb2.1-to-ejb3.0-migration. but some weeks ago we have been in deep doo-doo(?). the problem was the performance of the ejb3 entity manager when it came to persist, update and remove very, very much entities in one long transaction (long >= 2 minutes).
we tried to log and debug the data layer and finally recognized, that performance of calling entity manager's cud methods (create, update, delete) slows down more and more the longer the transaction is running.
our sample transaction took about 8 minutes before ejb 3.0. after migration, it always met the transaction timeout (>= 30 minutes (for testing)!!) and we had no idea what could be the reason. question: Hibernate? well, we tried another persistence provider (thanks JBoss for easy changing the persistence provider! :) *noirony*), EclipseLink, and got it done in about 10 minutes. answer: Hibernate!?
kind of strange behaviour, we thought, but we were able to find a solution: we now dont call flush after single cud methods, but call flush and clear on entity manager just before our data layer returns. that improved our performance extremly; after applying the new pattern, our sample transaction took about 2 minutes (Hibernate! EclipseLink now needs about 22 minutes ;)).
so far...
i hope, our experiments and experience may help others, too.
regards
robert
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240770#4240770
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240770
14 years, 11 months
[JBoss jBPM] - Re: WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.g
by vnm
Hi Ronald,
Sorry to send you improper code..As I was in bit hurry to send you I just skipped to resolve compilation issues,below is my modified code..Before you run it I request you to put my processdefintion.xml in src for testing,herein with I am also sending you my xml..
And another thing I want to mention is in my code import org.jbpm.db.AbstractDbTestCase; this import couldnt be resolved as this class in not in my jbpm-jpdl.jar...I am using jbpm version 3.2.3..And the same class is used in java file for which you sent me the link
code of class
| package org.jbpm.job.executor;
|
| import java.io.Serializable;
| import java.util.ArrayList;
| import java.util.Collections;
| import java.util.HashSet;
| import java.util.List;
| import java.util.Set;
| import java.util.TreeSet;
|
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
| import org.jbpm.JbpmConfiguration;
| import org.jbpm.JbpmContext;
| import org.jbpm.context.exe.ContextInstance;
| import org.jbpm.db.AbstractDbTestCase;
| import org.jbpm.graph.def.Action;
| import org.jbpm.graph.def.ActionHandler;
| import org.jbpm.graph.def.ProcessDefinition;
| import org.jbpm.graph.exe.ExecutionContext;
| import org.jbpm.graph.exe.ProcessInstance;
| import org.jbpm.graph.exe.Token;
| import org.jbpm.graph.node.DecisionHandler;
|
| public class JobExecutorDbTest extends AbstractDbTestCase {
| final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("jbpm.cfg.xml");
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| static final int nbrOfConcurrentProcessExecutions = 20;
| static final int timeout = 60000;
| final Log logger = LogFactory.getLog(getClass());
| static Set<String> collectedResults = Collections.synchronizedSet(new TreeSet<String>());
| static List<Long> allocatedProcessIds = Collections.synchronizedList(new ArrayList<Long>());
|
| @Override
| protected void setUp() throws Exception {
| super.setUp();
| getJbpmConfiguration().getJobExecutor().setNbrOfThreads(4);
| }
|
| @Override
| protected void tearDown() throws Exception {
| getJbpmConfiguration().getJobExecutor().setNbrOfThreads(1);
| super.tearDown();
| }
|
| public void testJobExecutor() {
| deployProcessDefinition();
| try {
| ServiceVO serviceVO = new ServiceVO();
| serviceVO.setProcessDefinitionName("SuperStateSample");
| initiateProcess(serviceVO);
| processJobs(timeout);
| // assertEquals(getExpectedResults(), collectedResults);
| }
| finally {
|
| }
| }
|
| void deployProcessDefinition() {
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("processdefinition.xml");
| jbpmContext.deployProcessDefinition(processDefinition);
|
| }
|
| void initiateProcess(ServiceVO serviceVO) {
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| String processName = serviceVO.getProcessDefinitionName();
| logger.info("processName==="+processName);
| ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate(processName);
| logger.info("--------------after getting processInstance");
| long processInstanceId = processInstance.getId();
|
| Token token = processInstance.getRootToken();
| logger.info("--------------after getting token");
| ContextInstance contextInstance = processInstance.getContextInstance();
| logger.info("--------------after getting contextInstance");
| contextInstance.setVariable("serviceVO", serviceVO);
|
| /*if(processVariables!=null){
| Set keySet = processVariables.keySet();
| Iterator keyIterator = keySet.iterator();
| String key = null;
| Object obj = null;
| while(keyIterator.hasNext()){
|
| key = (String)keyIterator.next();
| obj = processVariables.get(key);
|
| contextInstance.setVariable(key,obj);
|
| }
| }*/
| processInstance.signal();
| logger.info("---------after processInstance singal");
| logger.info("--------------after signal");
|
| logger.info("--------------after saving token");
| jbpmContext.save(processInstance);
| logger.info("--------------after saving processInstance");
| logger.info("root token======="+token.getId());
|
|
|
| jbpmContext.close();
| }
| }
|
| //start
| class ServiceVO implements Serializable{
|
|
|
| private String processDefinitionName;
|
|
| public String getProcessDefinitionName() {
| return processDefinitionName;
| }
|
| public void setProcessDefinitionName(String processDefinitionName) {
| this.processDefinitionName = processDefinitionName;
| }
|
|
|
| }
| //end
|
|
| //start
| class ActionHandler1 implements ActionHandler{
|
| public void execute(ExecutionContext executionContext) throws Exception {
| System.out.println("===========>>>>in action handler 1 >>>>>>>>>");
|
| }
| }
| //end
|
| //start
| class DecisionHandler1 implements DecisionHandler {
| public String decide(ExecutionContext arg0) throws Exception {
| // TODO Auto-generated method stub
| System.out.println("--in handler1-");
| return "node3";
| }
| }
| //end
|
| //start
| class DecisionHandler2 implements DecisionHandler {
| public String decide(ExecutionContext arg0) throws Exception {
| // TODO Auto-generated method stub
| System.out.println("--in handler2-");
| return "node4";
| }
| }
|
| //end
code for processdefinition.xml
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="SuperStateSample">
|
|
| <start-state name="start-state1">
| <transition to="node1"></transition>
| </start-state>
|
|
| <node name="node1">
| <event type="node-enter">
| <action name="action1" class="testFolder.ActionHandler1"></action>
| </event>
| <transition to="super-state1"></transition>
| </node>
|
| <super-state name="super-state1">
| <node name="node3">
| <event type="node-enter">
| <action name="action3" class="testFolder.ActionHandler3"></action>
| </event>
| <transition to="join1"></transition>
| </node>
| <node name="node4">
| <event type="node-enter">
| <action name="action4" class="testFolder.ActionHandler4"></action>
| </event>
| <transition to="join1"></transition>
| </node>
| <decision name="decision1">
| <handler class="testFolder.DecisionHandler1"></handler>
| <transition to="node3" name="node3"></transition>
| <transition to="join1" name="to join1"></transition>
| </decision>
| <decision name="decision2">
| <handler class="testFolder.DecisionHandler2"></handler>
| <transition to="node4" name="node4"></transition>
| <transition to="join1" name="to join1"></transition>
| </decision>
| <join name="join1">
| <transition to="node5"></transition>
| </join>
| <fork name="fork1">
| <transition to="decision1"></transition>
| <transition to="decision2" name="to decision2"></transition>
| </fork>
| <node name="node5">
| <event type="node-enter">
| <action class="testFolder.ActionHandler5"></action>
| </event>
| </node>
| <node name="node2">
| <event type="node-enter">
| <action name="action2" class="testFolder.ActionHandler2"></action>
| </event>
| <transition to="fork1"></transition>
| </node>
| <transition to="end-state1"></transition>
| </super-state>
|
|
| <end-state name="end-state1"></end-state>
|
|
| </process-definition>
jbpm.cfg.xml
| <jbpm-configuration>
|
| <!--
| The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
| Those configurations can be overwritten by putting this file called
| jbpm.cfg.xml on the root of the classpath and put in the customized values.
| -->
| <jbpm-context>
| <service name='persistence' factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />
| <service name='message' factory='org.jbpm.msg.db.DbMessageServiceFactory' />
| <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
| <!--<service name='scheduler' factory='org.jbpm.scheduler.db.DbSchedulerServiceFactory' />-->
| <service name='logging' factory='org.jbpm.logging.db.DbLoggingServiceFactory' />
| <service name='authentication' factory='org.jbpm.security.authentication.DefaultAuthenticationServiceFactory' />
| </jbpm-context>
|
| <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar-->
| <string name='resource.hibernate.cfg.xml' value='hibernate.cfg.xml' />
| <!-- <string name='resource.hibernate.properties' value='hibernate.properties' /> -->
| <string name='resource.business.calendar' value='org/jbpm/calendar/jbpm.business.calendar.properties' />
| <string name='resource.default.modules' value='org/jbpm/graph/def/jbpm.default.modules.properties' />
| <string name='resource.converter' value='org/jbpm/db/hibernate/jbpm.converter.properties' />
| <string name='resource.action.types' value='org/jbpm/graph/action/action.types.xml' />
| <string name='resource.node.types' value='org/jbpm/graph/node/node.types.xml' />
| <string name='resource.parsers' value='org/jbpm/jpdl/par/jbpm.parsers.xml' />
| <string name='resource.varmapping' value='org/jbpm/context/exe/jbpm.varmapping.xml' />
|
| <int name='jbpm.byte.block.size' value="1024" singleton="true" />
| <bean name='jbpm.task.instance.factory' class='org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl' singleton='true' />
| <bean name='jbpm.variable.resolver' class='org.jbpm.jpdl.el.impl.JbpmVariableResolver' singleton='true' />
|
| </jbpm-configuration>
Thanks and Regards
vnm
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240757#4240757
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240757
14 years, 11 months