[Design of POJO Server] - Re: Ordering of nested deployments
by scott.stark@jboss.org
"adrian(a)jboss.org" wrote : Why?
| ...
| Is there a case where stage N of an outer deployment depends
| upon stage N of an inner deployment?
|
One circumstance where there is a conflict between the structural parse and deployment phase is when adding a deployer which contains deployments. The war deployers contained in a jbossweb-tomcat6.deployer package also contains a ROOT.war. The structural pase phase identifies the jbossweb-tomcat6.deployer and jbossweb-tomcat6.deployer/ROOT.war as deployment contexts, but the deployer list is fixed going into the deploy loop.
Other than getting into full hotdeployment of deployers, we would need a notion of retrying deployment contexts that had no deployer if a deployer was added during a deploy loop.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977610#3977610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977610
19 years, 6 months
[Design of JBoss jBPM] - Re: MessageService and JMS
by mteira
I think I've found a bug in the CompositeCommand injection method. The problem is that findField method is only feeded with the class of the previous command result, and since it should search into the new Command class for a field suitable to be injected with the result of the previous command, I think it's wrong (at least it's not injecting). I've changed it and now seems to work:
### Eclipse Workspace Patch 1.0
| #P jbpm
| Index: jpdl/jar/src/main/java/org/jbpm/command/CompositeCommand.java
| ===================================================================
| RCS file: /cvsroot/jbpm/jbpm.3/jpdl/jar/src/main/java/org/jbpm/command/CompositeCommand.java,v
| retrieving revision 1.1
| diff -u -r1.1 CompositeCommand.java
| --- jpdl/jar/src/main/java/org/jbpm/command/CompositeCommand.java 23 Aug 2006 15:37:37 -0000 1.1
| +++ jpdl/jar/src/main/java/org/jbpm/command/CompositeCommand.java 11 Oct 2006 15:15:59 -0000
| @@ -5,6 +5,8 @@
| import java.util.Iterator;
| import java.util.List;
|
| +import org.apache.commons.logging.Log;
| +import org.apache.commons.logging.LogFactory;
| import org.jbpm.JbpmContext;
| import org.jbpm.JbpmException;
|
| @@ -37,7 +39,7 @@
| }
|
| protected void tryToInject(Object lastResult, Command command) {
| - Field field = findField(lastResult.getClass());
| + Field field = findField(lastResult.getClass(), command);
| if (field!=null) {
| field.setAccessible(true);
| try {
| @@ -48,10 +50,10 @@
| }
| }
|
| - protected Field findField(Class clazz) {
| + protected Field findField(Class clazz, Command command) {
| Field field = null;
| int i=0;
| - Field[] fields = clazz.getDeclaredFields();
| + Field[] fields = command.getClass().getDeclaredFields();
| while ( (i<fields.length)
| && (field==null)
| ) {
| @@ -63,6 +65,9 @@
| }
| i++;
| }
| + log.debug("Field to inyect for class '"+clazz.getName()+"' is '"+field+"'");
| return field;
| }
| +
| + private static Log log = LogFactory.getLog(CompositeCommand.class);
| }
|
Also, I've added to the SignalCommand a new field as I commented before, to be able to send a composite command (NewProcessInstanceCommand,SignalCommand) with the latter using the ProcessInstance returned by the former:
### Eclipse Workspace Patch 1.0
| #P jbpm
| Index: jpdl/jar/src/main/java/org/jbpm/command/SignalCommand.java
| ===================================================================
| RCS file: /cvsroot/jbpm/jbpm.3/jpdl/jar/src/main/java/org/jbpm/command/SignalCommand.java,v
| retrieving revision 1.3
| diff -u -r1.3 SignalCommand.java
| --- jpdl/jar/src/main/java/org/jbpm/command/SignalCommand.java 23 Aug 2006 15:37:37 -0000 1.3
| +++ jpdl/jar/src/main/java/org/jbpm/command/SignalCommand.java 11 Oct 2006 15:19:29 -0000
| @@ -24,6 +24,7 @@
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
| import org.jbpm.JbpmContext;
| +import org.jbpm.graph.exe.ProcessInstance;
| import org.jbpm.graph.exe.Token;
|
| public class SignalCommand implements Command {
| @@ -34,14 +35,23 @@
| String transitionName = null;
|
| Token previousToken = null;
| + ProcessInstance previousProcessInstance = null;
|
| public Object execute(JbpmContext jbpmContext) {
| log.debug("executing "+this);
| - Token token = getToken(jbpmContext);
| - if (transitionName==null) {
| - token.signal();
| + if (previousProcessInstance!=null) {
| + if (transitionName==null) {
| + previousProcessInstance.signal();
| + } else {
| + previousProcessInstance.signal(transitionName);
| + }
| } else {
| - token.signal(transitionName);
| + Token token = getToken(jbpmContext);
| + if (transitionName==null) {
| + token.signal();
| + } else {
| + token.signal(transitionName);
| + }
| }
| return null;
| }
|
It seems to work. But I've seen a log that says the MessageService used is the DB based one:
2006-10-11 17:01:55,472 DEBUG [org.jbpm.svc.Services] closing service 'message': org.jbpm.msg.db.DbMessageService@6be4cc
| 2006-10-11 17:01:55,483 DEBUG [org.jbpm.msg.db.DbMessageService] messages were produced the jobExecutor will be signalled
|
|
I suppose that (once again) is caused by a missconfiguration. How should I configure what message service implementation should be used?
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977593#3977593
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977593
19 years, 6 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Server side HA and failover
by bstansberry@jboss.com
anonymous wrote :
| "brian .stansberry" wrote :
| | Stupid question: why does the client need to fail over to a particular server? The failover server needs to do work to recover persistent messages from the store, but once it's done that, aren't they available to a client connecting to any server?
|
| Each server maintains it's own set of queues each containing different sets of messages.
| So when a node fails the failover node needs to take over responsibility for the queues on the node that failed.
| This means creating those queues in memory and loading any persistent messages from storage into those queues (if in memory replication is being used the messages will already be there so no need to load from storage).
| This means clients need to reconnect the node which now hosts those queues so they can continue as if nothing happened.
I'm still not sure I understand. I completely understand about what the failover server needs to do; just not certain about why it matters which node the client connects to.
Is it because the recovered messages were part of a session, and to properly maintain the guaranteed order of delivery of messages from a particular JMS session, the client has to connect to the correct server?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977564#3977564
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977564
19 years, 6 months