[jBPM] - PM Clustering strategy for jBPM5
by new bee
new bee [https://community.jboss.org/people/newbird] created the discussion
"PM Clustering strategy for jBPM5"
To view the discussion, visit: https://community.jboss.org/message/750242#750242
--------------------------------------------------------------
I'm trying to achieve exactly what this thread is all about - have a cluster of several jBPM5 applications. They all areconnected to an enterprise service bus that can easily round-robin requests coming from the clustered web application. The exact use case is as follows:
1. jBPM5 Node 1 gets a request to create a process instance.There are several human tasks that need to be created - so Node 1 communicates to a cluster of Task Servers to have that done.
2. A user completes a human task which results in a Task server Node X communicating its completion to jBPM5 Node 2.
The point that I'm trying to make is that unless the jBPM5 nodes share the same knowledge session, Node 2 will not be able to pick up the task completion event and move the process instance alone because the process instance would only be available to the node that had created it. So, as Gary Tse had suggested in the opening message, I tried session sharing by executing the following on each node:
StatefulKnowledgeSession ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(1, kbase, config, env);
I reported the predictable failure due to optimistic locking not being the right strategy to handle concurrent updates from multiple nodes. So this isn't an option to build a clustered jBPM5 application. So I'm going to ask you again (I've asked you the same question in a different thread dedictaed to clustering) - what is your approach to building a clustered jBPM5 application for scalability and high availability? Every high volume mission critical enterprise application requires this as a matter of very high priority.
I am reposting the existing question as i do not find the appropriate answer at this link : https://community.jboss.org/thread/169261?start=0&tstart=0 https://community.jboss.org/thread/169261?start=0&tstart=0
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/750242#750242]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 8 months
[EJB3] - Real hard time with EJB3-- javax.naming.Reference instead of $Proxy
by robert allurent
robert allurent [https://community.jboss.org/people/robert.piskule] created the discussion
"Real hard time with EJB3-- javax.naming.Reference instead of $Proxy"
To view the discussion, visit: https://community.jboss.org/message/750237#750237
--------------------------------------------------------------
Hey all. I'm having a really difficult time with EJB3.
I have a server running a simple calculator demo. I am trying to create a Mule ESB call into it. If I run my calculator client standalone, it works fine. If I move my calculator client to Mule, it fails.
One hint I have is that running standalone, my EJB call returns a class $Proxy2 and running on Mule, it returns class javax.naming.Reference. Any Ideas
OUTPUT:
If I run my EJB Client on my local client, it works just fine:
Initializing
CLASS:class $Proxy2
Loaded Calculator Bean
public final float $Proxy2.division(float,float), public final float $Proxy2.subtract(float,float), .....public final void java.lang.Object.wait() throws java.lang.InterruptedException public final float $Proxy2.division(float,float), public final float $Proxy2.subtract(float,float), .....public final void java.lang.Object.wait() throws java.lang.InterruptedException
Result:-3.0
But if I run my EJB Client on my Mule Server, it breaks:
Initializing
CLASS:class javax.naming.Reference
Loaded Calculator Bean
public void javax.naming.Reference.add(int,javax.naming.RefAddr), public void javax.naming.Reference.add(javax.naming.RefAddr), ..... public void javax.naming.Reference.add(int,javax.naming.RefAddr), public void javax.naming.Reference.add(javax.naming.RefAddr), .....
java.lang.NoSuchMethodException: javax.naming.Reference.subtract(float, float)
at java.lang.Class.getMethod(Unknown Source)
CODE:
Here's my code. Like I said, it's identicle on both my Mule Server and Eclipse Client.
package com.allurent;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.mule.api.MuleEvent;
import org.mule.api.MuleException;
public class CalculatorLocal implements org.mule.api.processor.MessageProcessor
{
private static Object calculator = null;
public static void jspInit() {
System.out.println("Initializing");
Hashtable<String, String> t = new Hashtable<String, String>();
t.put("java.naming.provider.url", "jnp://localhost:1099");
t.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
t.put("java.naming.factory.initial", "org.jboss.naming.NamingContextFactory");
InitialContext ic = null;
try {
ic = new InitialContext(t);
} catch (NamingException e) {
e.printStackTrace();
}
Object temp = null;
try {
temp = ic.lookup("example/CalculatorBean/remote");
} catch (NamingException e) {
e.printStackTrace();
}
System.out.println("CLASS:"+temp.getClass());
calculator = temp;
System.out.println("Loaded Calculator Bean");
}
public static void jspDestroy() {
calculator = null;
}
public static void main (String [] args)
{
args = new String[3];
args[1] = "12";
args[2] = "15";
args[0] = "subtract";
jspInit();
try {
String s1 = args[1];
String s2 = args[2];
String s3 = args[0];
if ( s1 != null && s2 != null ) {
Float num1 = new Float(s1);
Float num2 = new Float(s2);
System.out.println(Arrays.toString(calculator.getClass().getMethods()));
Class<? extends Object> c = calculator.getClass();
Method m = c.getMethod(s3, float.class, float.class);
Object value = null;
value = m.invoke(calculator, num1.floatValue(), num2.floatValue());
System.out.println("Result:"+value.toString());
}
}
catch (Exception e) {
e.printStackTrace ();
}
jspDestroy();
}
@Override
public MuleEvent process(MuleEvent event) throws MuleException {
CalculatorLocal.main(new String [] {"test","test2"});
return null;
}
}
I've been working on this for 3 days now, and I'm at my wit's end.
Thanks,
-Rob
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/750237#750237]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 8 months
[JBoss Remoting] - Does Remoting allow load testing that 'simulates' a number of clients
by Mike Miller
Mike Miller [https://community.jboss.org/people/mikemil] created the discussion
"Does Remoting allow load testing that 'simulates' a number of clients"
To view the discussion, visit: https://community.jboss.org/message/750038#750038
--------------------------------------------------------------
Sorry if this is not the correct forum - please direct me to the correct forum, if that is the case.
Our application is a POS application that runs JNLP started remote clients using EJB 2.1. A potential customer wants us to run some volume tests that simulate approximately 50 cash registers attached to our store server and actively ringing transactions. I believe the tools our performance engineering team is planning on using is one of the Mercury (now HP) tools, using the RMI protocol feature.
My question is, if the test is driven from one box, does remoting see that as one client or 50 clients, if the ip address on the other end of the request is always the same?
I have never worked with any of these tools, but I would hope they can 'simulate' the client requests such that the application believes 50 clients are attached vs just 1 client and all traffic going across one set of sockets? Hope this makes sense.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/750038#750038]
Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 8 months
[JBoss Tools] - Multiple JPA projects - one persistence.xml - can not be done?
by jeff lowcock
jeff lowcock [https://community.jboss.org/people/aneh] created the discussion
"Multiple JPA projects - one persistence.xml - can not be done?"
To view the discussion, visit: https://community.jboss.org/message/749805#749805
--------------------------------------------------------------
To slightly expand the subject line. I have multiple JPA projects all created via JBoss Tools in eclipse 3.7 (Indigo), each JPS has it's own persistence.xml file each with a unique persistence unit definition so there should be no conflicts between the jars.. The spec says that you may reference multiple jpa jars by using the <jar-file> element in persistence.xml. So I have a problem, via the magic og JBoss Tools the location of the generated jar is unknown, although I am sure that someone out there can tell me where they are relative to either the workspace or the individual project. However it I define the jar location as it is when deployed the development environment shows errors indicating that the imported JPA classes are not Entity(s). That is they are not part of the JPA knowledge of the current project.
I know this is somewhat of an edge case but it is something I have wanted to do for a long time. I have a large number of self contained subject areas(i.e. discrete JPA jars) previously I did not have the time to resolve this issue and simply copied the same JPA class into as many projects as I needed - bad practice. Now I want to really have a nice modular solution where I can build once and include every where (not copy everywhere).
To offer a little more rationale I have a Person JPA, a Customer JPA , and a Supplier JPA project. Currently I have to copy all of the files into a single JPA project to create a solution. Not so bad you say! If you only have a single client you are right. However I have a number of clients all have these 3 JPA classes in common. So to reduce the copy and paste activities whenever an update is made I would like to find a solution for my problem.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/749805#749805]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 8 months
[jBPM] - jBPM5 Process Variables
by Mylos Kathos
Mylos Kathos [https://community.jboss.org/people/mylos78] created the discussion
"jBPM5 Process Variables"
To view the discussion, visit: https://community.jboss.org/message/750129#750129
--------------------------------------------------------------
Hi all,
I'm trying to migrate a process which was build on jBPM3 with the new jBPM5.
I have an old decision node which I have turned into a Gateway, adding into it (using Eclipse jBPM plugin) the constraint:
*return workorder > 100;*
Now I'm trying to start the process using
*Map<String, Object> inputParams = new HashMap<String, Object>();*
*inputParams.put("workorder", new Long(1500));*
* *
*// start a new process instance*
*ksession.startProcess("com.graph.process1",inputParams);*
However at runtime I get the following error
Could not find variable 'workorder' for action 'return workorder <= 100;' : mailto:org.drools.lang.descr.ProcessDescr@36527f org.drools.lang.descr.ProcessDescr@36527f
How can I reference a startup process variable in the Gateway constraint ?
Thanks
Mylos
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/750129#750129]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 8 months