[Design of JBoss jBPM] - Re: Command facade API
by tom.baeyens@jboss.com
the command service in pvm will be a building block.
it's up to the process languages or products to use that block and create public API's with it.
products can choose to build a full session facade and still expose the CommandService's execute(Command) method.
so in that context, command service can be both public and private.
i realize that this leaves too many unresolved variables in the equation for it to be resolved. the risk is always there that we will try to build a web services solution that is too generic.
in the solution that you work out, you'll have to make some choices anyway. but it would be good if you have an idea on how the solution fits this overall picture.
for sure, the product specific session facades will have to be exposed as web services. if the generic command executor could be exposed as well, that would be nice to have, but i can see there are a lot of problems with that. maybe there is a ws technology in which commands can be extended to have a java-to-xml-and-back conversion.
another approach is not to leverage the current domain model objects (ProcessInstance, Token, ProcessDefinition,...) but instead just to define a completely separate set of limited DTO's just for the web service publication. then the web service would be fixed (not very extensible). and it would be easy to implement with JAXB since the DTO's are under control of the web service.
That would be the simplest solution that works. If we can find a solid alternative solution that is more generic, that is better. But it doesn't have to be more generic if it's going to be more complicated for the user or for the implementation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125026#4125026
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125026
16 years, 11 months
[Design of JBoss jBPM] - Re: Command facade API
by heiko.braun@jboss.com
Tom wrote:
the general idea is as follows:
the commands are the basic blocks.
the command executor is a generic session facade for executing commands with 1 method:
interface CommandExecutor {
Object execute(Command cmd);
}
then from that we could build specific facades like e.g.
interface WorkflowEngine {
ProcessInstance startNewProcessInstance(String processName);
Token signal(Token token);
...
}
the method implementations will just create the command and send it to a command
executor. those session facades could themselves expose the execute(command) method.
that could be a way to keep the session facade extensible.
once you get into these interfaces, things are hard to keep them uniform. the most
difficulty i have on this level is hibernate's lazy loading when returning objects.
hibernate works perfect. but what part of the object graph do we have to pre-load
when returning objects from our persistent domain model ?
when the execute(command) is exposed, extending commands with inheritence could also
be used to append this eager loading inside the transaction of the command.
similar problems and more will have to be resolved for web services. i don't think
that we should try to target the single generic web service that matches all these
use cases. we should try to search for a specific solution that is a good balance
between 1) ease of use 2) coverage of the use cases and 3) ease to implement
HTH to see the context of what we're looking for.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125010#4125010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125010
16 years, 11 months
[Design of JBoss Serialization] - jboss-serialisation on 4.2.0.GA
by pdhaigh
Hi,
I was wondering if anyone might be able to help me understand why I intermittently see this error:
2008-01-30 19:05:31,749 ERROR [ejb3.cache.simple.SimpleStatefulCache.ReportController] problem passivation thread
| javax.ejb.EJBException: Could not passivate; failed to save state
| at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:406)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:301)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:209)
| Caused by: java.io.IOException
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:129)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
| at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
| at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
| at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:842)
| at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
| at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:390)
| ... 2 more
| Caused by: java.lang.reflect.InvocationTargetException
| 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:597)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
| at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
| at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
| at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:842)
| at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| Caused by: java.lang.NullPointerException
| at javax.faces.component.UIComponentBase.saveAttachedState(UIComponentBase.java:1339)
| at javax.faces.component.UIComponentBase.saveBindingsState(UIComponentBase.java:1447)
| at javax.faces.component.UIComponentBase.saveState(UIComponentBase.java:1238)
| at javax.faces.component.UIData.saveState(UIData.java:530)
| at javax.faces.component.html.HtmlDataTable.saveState(HtmlDataTable.java:883)
| at javax.faces.component.UIComponentBase$AttributesMap.writeObject(UIComponentBase.java:1760)
| 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:597)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
| at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
| at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
| at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
| at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
| at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:842)
| at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
| at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
| at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
| at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
| at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:390)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:301)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:209)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124927#4124927
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124927
16 years, 11 months