[Design of EJB 3.0] - Unnecessary read before update with merge()
by markvl2
Hope I'm not posting this to the wrong forum. I raised this first on the EJB3 and Hibernate user forums but have come to the conclusion it is a design / implementation issue with EJB3/Hibernate.
I have a simple case of an entity which is read in one thread, then updated in another thread using merge().
The Hibernate merge() code always reads the original value of a detached entity. From DefaultMergeEventListener.entityIsDetached():
| //we must clone embedded composite identifiers, or
| //we will get back the same instance that we pass in
| final Serializable clonedIdentifier = (Serializable) persister.getIdentifierType()
| .deepCopy( id, source.getEntityMode(), source.getFactory() );
| final Object result = source.get(entityName, clonedIdentifier);
|
It should be possible to update the entity without the original value of the entity being read from the DB. This is causing an unncecessary call to the DB.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991824#3991824
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991824
18 years, 1 month
[Design of JBoss jBPM] - Re: continuous integration?
by Digeratus
I started looking around (it's been years since I played with javamail) and it seems like it's just a property that can be set. So I'll poke at that a bit. if.... I can get a build working ;^)
Right now (after a cvs update today) I get a build failure because of...
/mnt/bayDrive/local/jboss/jbpm/jbpm.3/build/build.xml:56: The following error occurred while executing this line:
/mnt/bayDrive/local/jboss/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl.build/build.xml:58: The following error occurred while executing this line:
/mnt/bayDrive/local/jboss/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl.build/build.xml:165: The following error occurred while executing this line:
java.io.FileNotFoundException: /mnt/bayDrive/local/jboss/jbpm/jbpm.3/designer/jpdl/org.jbpm.gd.jpdl.build/target/projects/org.jbpm.gd.jpdl.docs/gpd.userguide/build.xml (No such file or directory)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991802#3991802
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991802
18 years, 1 month