[jBPM] New message: "Re: Problem Signaling a Waiting Execution"
by Andy Barreras
User development,
A new message was posted in the thread "Problem Signaling a Waiting Execution":
http://community.jboss.org/message/521216#521216
Author : Andy Barreras
Profile : http://community.jboss.org/people/FlyNavy
Message:
--------------------------------------------------------------
Thanks Ronald. You didn't offend me at all. In fact, I appreciate all of he help you have provided. Your explanation jives with what I expected. The issue I'm having seems to be that I cannot get the Execution to advance from one node to the next. I'm going to try and build a simple Java test app that will orchestrate the entire workflow programatically. My assumption had been that jBPM did that automatically by simply signalling the Process Instance. I'll let you nkow how it goes.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521216#521216
16 years, 3 months
[jBPM] New message: "Re: Strange Fork Behavior"
by Santanu Saraswati
User development,
A new message was posted in the thread "Strange Fork Behavior":
http://community.jboss.org/message/521212#521212
Author : Santanu Saraswati
Profile : http://community.jboss.org/people/saraswati.santanu
Message:
--------------------------------------------------------------
This is a bug in JBPM. The class that causes the problem is ForkActivity. Here is a discussion which explains the problem
http://community.jboss.org/message/400655#400655
One of the solution there, which keeps a dummy node, is a hack for sure. But it works. If you do not want to modify JBPM code and want to lie with the bug till next release (hopefully), then you can do that.
The other one which modifies the ForkActivity source sounds more logical.
There can be one more way to fix this. Lets look at the problematic segment once more (the one in red):
*if (Execution.STATE_ACTIVE_ROOT.equals(execution.getState())) {
concurrentRoot = execution;
execution.setState(Execution.STATE_INACTIVE_CONCURRENT_ROOT);
execution.setActivity(null);
} else if (Exec ution.STATE_ACTIVE_CONCURRENT.equals(execution.getState())) {
concurrentRoot = execution.getParent();
}*
*for (Transition transition: forkingTransitions) {
// launch a concurrent path of execution
String childExecutionName = transition.getName();
ExecutionImpl concurrentExecution = concurrentRoot.createExecution(childExecutionName);
concurrentExecution.setActivity(activity);
concurrentExecution.setState(Execution.STATE_ACTIVE_CONCURRENT);
concurrentExecution.take(transition);
if (concurrentRoot.isEnded()) {
break;
}
}*
Here the parent of the first level fork becomes the parent of the second level fork as well. And that is the root of the problem. So there can be two solutions possible. We talked about one of them in that older post. Lets look at both of them one by one:
1. This sound most logical to me. The parent of the second level fork should be the first level for. So set the first level fork as the parent of the econd level fork. For this the first line in red needs to be changed to :
*else if (Exec ution.STATE_ACTIVE_CONCURRENT.equals(execution.getState())) {*
* //notice that we removed getParent() here**
concurrentRoot = execution;
}*
2. One more way to solve the prblem might be to end the first level fork execution, because that has anyway nothing on earth to do. To do this we may do something like this:
*else if (Exec ution.STATE_ACTIVE_CONCURRENT.equals(execution.getState())) {
concurrentRoot = execution.getParent();*
* //notice this end call here*
* * *execution.end();*
* }*
Again, my vote is for the first one. But both af them seem to work.
Regards,
Santanu
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521212#521212
16 years, 3 months
[EJB 3.0] New message: "Calling EJB from servlet - EJB's interface class not found"
by Mike Johnson
User development,
A new message was posted in the thread "Calling EJB from servlet - EJB's interface class not found":
http://community.jboss.org/message/521206#521206
Author : Mike Johnson
Profile : http://community.jboss.org/people/micjohnson997
Message:
--------------------------------------------------------------
I have deployed several EJBs into an EAR on JBoss 6.0.0 M1. I then have a separate WAR (not deployed inside the EAR) with a servlet that uses InitialContext.lookup() on the remote name of the EJB. When doing this, I get a ClassNotFoundException for the interface class, even though the interface class is inside a JAR in the WAR's WEB-INF/lib directory. Here's the start of the stack trace:
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@efdd6a]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1508)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:824)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
then of course there's a bunch more stuff, followed by:
Caused by: java.lang.ClassNotFoundException: <My interface class name>
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:406)
I've seen several posts talking about potential classloader issues, but I'm not familiar with the JBoss class loading scheme, so I was hoping someone had written up some good directions on how to correctly configure everything for calling an EJB from a WAR.
Thanks in advance,
Mike Johnson
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521206#521206
16 years, 3 months
[jBPM] New message: "Re: Strange Fork Behavior"
by Andre Muniz
User development,
A new message was posted in the thread "Strange Fork Behavior":
http://community.jboss.org/message/521203#521203
Author : Andre Muniz
Profile : http://community.jboss.org/people/andre.muniz
Message:
--------------------------------------------------------------
Sorry, the test really wasn't clear enough. I know task3 is duplicated because I debugged it!
Here goes the new unit test:
package test2;
import java.util.List;
import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
public class ForkTest extends JbpmTestCase {
/** Deployment id. */
String deploymentId;
/**
* Set up.
* @throws Exception exception
*/
protected void setUp() throws Exception {
super.setUp();
// XML definition
StringBuilder jpdl = new StringBuilder();
jpdl.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
jpdl.append("<process key=\"forkTest\" name=\"Fork Test\" xmlns=\"http://jbpm.org/4.3/jpdl\">");
jpdl.append(" <start g=\"7,137,48,48\" name=\"Lease Termination\">");
jpdl.append(" <transition g=\"-43,-18\" name=\"to fork1\" to=\"fork1\"/>");
jpdl.append(" </start>");
jpdl.append(" <end g=\"841,83,48,48\" name=\"end1\"/>");
jpdl.append(" <fork g=\"118,140,48,48\" name=\"fork1\">");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task1\" to=\"task1\"/>");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task2\" to=\"task2\"/>");
jpdl.append(" </fork>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"231,71,92,52\" name=\"task1\">");
jpdl.append(" <transition name=\"to join2\" to=\"join2\" g=\"-41,-18\"/>");
jpdl.append(" </task>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"230,225,92,52\" name=\"task2\">");
jpdl.append(" <transition name=\"to fork2\" to=\"fork2\" g=\"-43,-18\"/>");
jpdl.append(" </task>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"507,188,92,52\" name=\"task3\">");
jpdl.append(" <transition g=\"-41,-18\" name=\"to join1\" to=\"join1\"/>");
jpdl.append(" </task>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"511,306,92,52\" name=\"task4\">");
jpdl.append(" <transition g=\"-41,-18\" name=\"to join1\" to=\"join1\"/>");
jpdl.append(" </task>");
jpdl.append(" <join g=\"653,244,48,48\" name=\"join1\">");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task5\" to=\"task5\"/>");
jpdl.append(" </join>");
jpdl.append(" <task candidate-groups=\"leasing\" g=\"781,237,92,52\" name=\"task5\">");
jpdl.append(" <transition g=\"-41,-18\" name=\"to join2\" to=\"join2\"/>");
jpdl.append(" </task>");
jpdl.append(" <join g=\"674,80,48,48\" name=\"join2\">");
jpdl.append(" <transition g=\"-42,-18\" name=\"to end1\" to=\"end1\"/>");
jpdl.append(" </join>");
jpdl.append(" <fork g=\"402,232,48,48\" name=\"fork2\">");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task3\" to=\"task3\"/>");
jpdl.append(" <transition g=\"-44,-18\" name=\"to task4\" to=\"task4\"/>");
jpdl.append(" </fork>");
jpdl.append("</process>");
// Deploys the process
deploymentId =
repositoryService.createDeployment().addResourceFromString("forkTest.jpdl.xml", jpdl.toString())
.deploy();
}
/**
* Tear down.
* @throws Exception exception
*/
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
super.tearDown();
}
/**
* Tests the process.
*/
public void testProcess() {
// Starts a new process instance
executionService.startProcessInstanceByKey("forkTest");
// Gets the pending tasks (task1 and task2)
List < Task > taskList = taskService.createTaskQuery().list();
assertEquals(2, taskList.size());
assertContainsTask(taskList, "task1");
assertContainsTask(taskList, "task2");
// Completes task1 and task2
taskService.completeTask(taskList.get(0).getId());
taskService.completeTask(taskList.get(1).getId());
// Gets the pending tasks (task3 and task4)
taskList = taskService.createTaskQuery().list();
// At this point we should have 2 pending tasks ([0] = task3, [1] = task4)
// But the following tests shows that the taskList collection contains 3 pending tasks ([0] = task3, [1] = task4, [2] = task3)
assertEquals(3, taskList.size());
assertEquals("task3", taskList.get(0).getName());
assertEquals("task4", taskList.get(1).getName());
assertEquals("task3", taskList.get(2).getName());
// This should be the right result, but it's where the test is breaking now
// Failure Trace: "expected:<2> but was:<3>"
assertEquals(2, taskList.size());
assertEquals("task3", taskList.get(0).getName());
assertEquals("task4", taskList.get(1).getName());
}
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521203#521203
16 years, 3 months
[Performance Tuning] New message: "Memory consumption 1h after JBoss start"
by Giovanni Formenti
User development,
A new message was posted in the thread "Memory consumption 1h after JBoss start":
http://community.jboss.org/message/521196#521196
Author : Giovanni Formenti
Profile : http://community.jboss.org/people/gifor
Message:
--------------------------------------------------------------
Hi,
I have a strange behavior on my JBoss during load test.
I start JBoss and after some minutes I start my load test script. After exactly 1 hour (both with 70 or 150 concurrent users of constant workload during the whole test period), I experience a memory consumption even if the workload is constant. Even if I start my load test 30min after JBoss is started, after 30min I get the same result (1h after JBoss start).
The IBM Monitor & Diagnostic Tools for GC say:
"Heap usage seems to be growing over time. It increased by 180% in the last third of the log compared to the middle of the log. The number of collections also increased by 820% in response to the increased pressure on the heap. The increasing rate of collections may degrade your application performance." (and the performance actually degrade!)
My JBoss configuration:
JBoss version: 5.1 for JDK6 on a WinXP notebook
JVM params: -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
Profile: all
Application architecture: requests to a web service layer, this layer calls an MBean (newProxyInstance) to retrive session info and execute http calls with HTTPClient to an external Tomcat server.
Here you can see the memory trend:
http://community.jboss.org/servlet/JiveServlet/showImage/1818/heap.jpg
Thanks for any suggestion on which could be the cause!
Regards
Giovanni
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/521196#521196
16 years, 3 months