Jay,
Le 17/10/2013 15:44, Jay Shaughnessy a écrit :
The changes look thorough, I have a few comments:
- I'm not sure about the Async change on the server service, maybe mazz
can comment. But even if you lose the async calling I think you don't
want to lose the guaranteed delivery. So you may want to consider (I
think we allow this):
@Asynchronous(value = false, guaranteedDelivery = true)
As Mazz said, this does not exist. Anyway synchronous calls guarantee
the delivery.
- The check for isCreatable and then the subsequent name update code,
I
think this can go above the entityManager.persist(resource);. Very
minor given everything else we do when merging a resource, but it could
save an update if we change the name.
Right, I will update the changeset.
- minor, just wondering why in findMatchingCreateResourceHistory()
you
create a query with order by, and not just a usual named query, avoiding
all the pageControl/Ordering field stuff. There should only be at most
one result as resource keys are unique among a parent.
#findMatchingCreateResourceHistory use the new
CreateResourceHistory.QUERY_FIND_BY_CHILD_RESOURCE_KEY named query.
PersistenceUtility#createQueryWithOrderBy is used because I did not want
to load all the entities from the database. There could be more than one
entity with the same parentId and resource key (if you deleted then
created again a resource).
Thomas