[Design of JBoss Transaction Services] - Re: transaction support in JBossAS 5.0
by reverbel
"mark.little(a)jboss.com" wrote : "reverbel" wrote : "mark.little(a)jboss.com" wrote : "reverbel" wrote :
| | | | Instead of embedding a full Xid into, say, the object id part of an IOR, the OTS/DTM code uses a long (the local transaction id) as the CORBA object id. Besides reducing wire traffic and marshalling overhead, this approach reduces logging overhead, as it reduces the size of transaction log records that contain Resource or Coordinator references.
| | | |
| | |
| | | I will just say that the problems with storing anything that isn't guaranteed to be globally unique are fairly obvious and risky where transaction processing is concerned.
| |
| | Not sure what was your point here... Resource and Coordinator references are globally unique, as each such reference contains endpoint info such as host and port, plus a local id field that is unique within that endpoint. Usage of "really local" ids (rather than using full Xids as local id values) avoids nesting of globally unique identifiers, which would be a wasteful thing to do.
| |
| | Regards,
| |
| | Francisco
|
| But if these longs or integers are being stored with the log as a reference to a Resource/Coordinator/Xid, then eventually your identifier will wrap. This means that it's possible for the same id to be used to key into different Resource/Coordinator/Xids at the same time.
In practical terms, this is not possible if local transaction ids are 64-bit longs. Even with a sustained transaction rate of one million TPS (one transaction per microsecond!), it would take more than five hundred thousand years (!!) for a 64-bit transaction counter to wrap:
60 seconds/min * 60 mins/hr * 24 hrs/day * 365 days/year = 31536000 seconds/year
2^64 transactions/wrap * 10^-6 seconds/transaction * 31536000 seconds/year = 584942.41 years/wrap
Regards,
Francisco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976990#3976990
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976990
19 years, 6 months
[Design of JBoss jBPM] - Re: ProcessDefinition with no startTask
by mteira
Thanks for your response, David.
What I actually wanted to know is whether a Process Definition without an start task (I understand that this is equivalent to a Process Definition with a task in the start-state node) is valid.
>From the jbpm-console operation point of view it doesn't makes a lot of sense (as it seems that every Process Definition must provide a start task form, included from taskform.xhtml), but I think that conceptually, there's no problem with a Process without an start task.
Furthermore, the previous error showed because I deployed a process created from scratch using the Graphic Designer, where the 'start-state' node definition doesn't have a task. I've seen that the example process 'simple' created as a template by the 'new jpbm project' wizard, has an start-state containing:
<start-state name="start">
| <task>
| <controller>
| <variable name="color" />
| <variable name="size" />
| </controller>
| </task>
| <transition name="to_state" to="first">
| <action name="action" class="com.sample.action.MessageActionHandler">
| <message>Going to the first state!</message>
| </action>
| </transition>
| </start-state>
So, it has an start task.
Anyway, after deploying this process definition, I was not able to create a new process instance, as no 'forms.xml' file is bundled with the project:
Caused by: org.jbpm.JbpmException: couldn't get inputstream for file 'forms.xml'
|
| at org.jbpm.file.def.FileDefinition.getInputStream(FileDefinition.java:1
| 29)
| at org.jbpm.webapp.taskforms.TaskForms.getProcessFormPaths(TaskForms.jav
| a:71)
| at org.jbpm.webapp.taskforms.TaskForms.getTaskFormPath(TaskForms.java:44
| )
| at org.jbpm.webapp.bean.TaskBean.getTaskFormPath(TaskBean.java:93)
| at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at javax.el.BeanELResolver.getValue(BeanELResolver.java:218)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:135)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELRe
| solver.java:62)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
| at com.sun.el.parser.AstNotEqual.getValue(AstNotEqual.java:20)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
|
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.ja
| va:71)
| ... 47 more
| Caused by: org.jbpm.JbpmException: file 'forms.xml' not found in db
| at org.jbpm.file.def.FileDefinition.getByteArray(FileDefinition.java:210
| )
| at org.jbpm.file.def.FileDefinition.getInputStreamFromDb(FileDefinition.
| java:169)
| at org.jbpm.file.def.FileDefinition.getInputStream(FileDefinition.java:1
| 26)
| ... 60 more
|
|
Don't missunderstand me. I'm not just complaining about these errors. What I would like to know is if they are my mistake or just bugs that need to be corrected. I'm trying to gain knowledge about how the whole thing works, and need to understand basic concepts as whether a process instance needs an start task, or I'm facing just an artificial dependency created by the jbpm-console, or just a bug (or my fault).
Thanks a lot and regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976975#3976975
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976975
19 years, 6 months
[Design of JBoss jBPM] - ProcessDefinition with no startTask
by mteira
Trying to create a new ProcessInstance using the jbpm-console from a ProcessDefinition with no startTask throws an error in the jbpm-console. Something like:
An Error Occurred:
| /common/taskform.xhtml @21,50 src="#{taskBean.taskFormPath}" /common/taskform.xhtml @21,50 src="#{taskBean.taskFormPath}": java.lang.NullPointerException
The error is caused by:
Caused by: java.lang.NullPointerException
| at org.jbpm.webapp.taskforms.TaskForms.getTaskFormPath(TaskForms.java:44)
| at org.jbpm.webapp.bean.TaskBean.getTaskFormPath(TaskBean.java:92)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at javax.el.BeanELResolver.getValue(BeanELResolver.java:218)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:135)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:62)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
|
It seems that the root of the problem is org.jbpm.webapp.bean.TaskBean getTask() method returning null for a ProcessInstance without an StartTask, and so, we are eventually calling TaskForms.getTaskFormPath with a null argument from taskform.xhtml:
<ui:define name="body">
| <ui:include src="#{taskBean.taskFormPath}" />
| ...
|
So, should all ProcessDefinition has an StartTask form? Or should that form be included from taskform.xhtml only when it exists?
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976949#3976949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976949
19 years, 6 months