[JBoss Messaging] - Re: JBM 2.0 Clustering
by clebert.suconic@jboss.com
Are these nodes on a local or remote network?
For Clustering on 1.4, we are using JGroups to find the participant nodes.
The way our clustering currently works is, JGroups is used to establish the members of the cluster, and we then create regular Consumers between the nodes controlling the load balancing between them.
It is possible to configure JGroups on TCP and do some other stuff, but all the tests we have done with Clustering were basically on a local network, using UDPs and JGroups.
I'm not sure yet if that will still be the case for JBM 2, and we can certainly take your needs on the design considerations.
The bridge would be more or less the same thing, but more appropriate for remote clients. Thinking for example if your application is a Point of Sale where you don't have direct connections to the other members all the time.
The problem with JBM 1.4 is the Embed Support you need. We have cleaned a lot of the dependencies on JBM 2, what would make your life easier on instantiating the POJOs. For JBM 1.4 we simply don't support the embed as it would be too hacky doing it.
You could prototype with JBM 1.4 if you don't use the embedding.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157772#4157772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157772
17 years, 10 months
[JBoss jBPM] - TaskInstance.setActorId(String) causes set TaskInstance to b
by Octomac
I'm integrating jBoss jBPM with a JSF web application using a Glassfish server.
I'm having two issues with the setActorId method of the TaskInstance object. For one, it seems that when I use this method to set a new Actor Id for a specified task, that task is rendered as closed (i.e. the ISCANCELLED flag in the TASKINSTANCE table is set to true). Actually, all the boolean flags (canceled, suspended, open, etc.) are set to true, but I think the ISCANCELLED one is what's actually causing the tasks to fail to show up in the new task list.
The second problem I'm experiencing is that the changes I make to the list of tasks for my users do not seem to show up in the application until I redeploy it. That is, I can see the changed ActorID in the database by quering it with an SQL tool, but until I redeploy the application, those changes are not reflected. The reassigned task still appears in the "old" user's list. I was under the impression that calling JbpmContext.save(TaskInstance); followed by JbpmContext.close(); would commit the changes to the database, which appears to be happening, but the next time I rebuild the list of tasks, JBPM continues to use the data that was pulled prior to saving the new task owner.
The code that I am using to perform the task reassignment is duplicated below. If anyone can see any obvious reason why I might be experiencing these issues, please let me know.
This is the task assignment code in my JBPMController class, which holds all of my directly jBPM-related code.
| public void assignTask(String taskId, String userId)
| {
| long taskInstanceId = Long.parseLong(taskId);
| TaskInstance thisTask = jbpmContext.getTaskInstance(taskInstanceId);
| thisTask.setActorId(userId);
| jbpmContext.save(thisTask);
| }
|
That code is called from my ProcessController class, a session bean in my JSF application. Here is the calling function:
| public String assignTask() throws SQLException, ClassNotFoundException{
| try{
| controller.openJbpmContext();
| if(selectedTask != null && selectedTask != ""){
| int taskId = Integer.parseInt(selectedTask);
| controller.assignTask(selectedTask, uid);
| }
| }
| finally{
| controller.closeJbpmContext();
| }
| return("Set");
| }
|
The openJbpmContext and closeJbpmContext methods above are part of the JBPMController class, and are there only to open and close the JbpmContext object in the Controller. I've reproduced them here:
| public void openJbpmContext()
| {
| jbpmContext = jbpmConfiguration.createJbpmContext();
| }
|
| public void closeJbpmContext()
| {
| jbpmContext.close();
| }
|
I can't think of anything else in my code that is relevant to this problem, but if more information is required, I'll do my best to post it here. If anyone has any ideas on why I might be experiencing the problems that I am, I would greatly appreciate your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157754#4157754
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157754
17 years, 10 months
[JBoss Messaging] - Re: Help on JBoss Messaging
by clebert.suconic@jboss.com
"ebenezerlovelin" wrote :
| 1. Now, when I use different machines, I dont have to Uncomment binding manager service from $JBOSS_CONFIG/conf/jboss-service.xml, if I am not wrong.
|
You don't need to use the binding manager if you are using three different machines.
You don't need also to use the binding manager if on the same machine, if you bind each server to a different IP. On my test environment for example, I have three dumb nics working as looopback, and I can do:
./run.sh -c messaging -b IP
"ebenezerlovelin" wrote :
|
| 2. I see from the guide that, if there are several Jboss messaging instances running on differtent machines in the network, then when the all these instances are started using the run -c messaging, they form a partition (Default Partition). How do I customize this; I mean, how do I allow only the instances that I need, to form a partition? When I started my Jboss messaging instance, I was able to see the instances running in my co-worker's machine were also taking part in the cluster and finally he had to turn of the cluster attribute to false in his postoffice in the mysql-persistence-service.xml .
|
|
You mean... having different cluster partitions?
you can change the JGroups IP on Database-persistence.xml
You can also pass that as a parameter on run.conf.
"ebenezerlovelin" wrote :
|
|
| 3. I have three messaging nodes in the partition. One of the clients attached to node one is loading the queue in node one with messages. I am not sending any messages to the other two queues. However, I have three listeners (one for each node) listening to the queue. I would like to know if the messages are evenly distributed to all the queues in the partition. I am using the ClusterPullConnectionFactoryName in messaging-service.xml file.
| Ebe
You will have messages distributed to the other nodes if you don't have a local node where you're sending the message. We aways favour the local Queues first, avoiding non necessary cluster trips.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157752#4157752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157752
17 years, 10 months