[JBoss Seam] - Re: Building parent and child in one page
by petemuir
Ooops, sorry, I should have written
anonymous wrote : Try using nested conversations I think, you may also need use multiple entitiy managers, one for the parent conversation and one each nested conversation - be careful when loading entities that you get it from the correct one.
This is probably best, but is perhaps hardest to get right IMO.
You don't want to do this using transaction AFAICS, I really meant you would do a reload of the entity from the PC in code, but I this is really fighting against the way hibernate works and would be a mess!
Detached entities would allow you to manually merge only the entities you wanted to save (along with the correct cascades) - but you loose all the benefits of the entity being managed. Perhaps this is most practical solution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052825#4052825
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052825
18Â years, 10Â months
[JBoss jBPM] - loading resource from process class
by gogoasa
Hello,
I wonder if there is some "good practice" to recommend concerning loading properties files inside a process archive.
My process actions call EJBs on a remote cluster and must have access to cluster location properties located in a file called jndi-services.properties.
Some time ago I tried to deploy the .properties file with the process but if I remember correctly, jBPM 3.2.0 did not store resources in database along .classes.
I now tried including my .properties file in the jbpm-configs.jar deployed with my jBPM 3.2.1-CVS ear. It doesn't seem to work either :
| 17:02:38,269 ERROR [OnErrorAction] caught exception
| org.jbpm.JbpmException: couldn't get value for file 'jndi-services.properties'
| at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:196)
| at org.jbpm.instantiation.ProcessClassLoader.getResourceAsStream(ProcessClassLoader.java:43)
| at fr.bnf.entrychain.jbpm.actions.ServiceClusterJndiProperties.<init>(ServiceClusterJndiProperties.java:31)
| at fr.bnf.entrychain.jbpm.actions.OnStartAction.execute(OnStartAction.java:24)
| at org.jbpm.graph.def.Action.execute(Action.java:122)
|
| ...
|
| Caused by: java.lang.NullPointerException
| at org.jbpm.file.def.FileDefinition.getBytesFromDb(FileDefinition.java:213)
| at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:193)
| ... 79 more
|
If I understand correctly the upper stacktrace, ProcessClassLoader does not find the resource in the database, which is normal, since it is not deployed there. Why does it not delegate then to its parent, which, in the case of my jBoss deployment, is org.jboss.mx.loading.UnifiedClassLoader3 ?
Thank you,
Adrian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052816#4052816
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052816
18Â years, 10Â months