« Return to Thread: [jira] Created: (JDO-589) Allow makePersistent outside a transaction

[jira] Commented: (JDO-589) Allow makePersistent outside a transaction

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View in Thread


    [ https://issues.apache.org/jira/browse/JDO-589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585309#action_12585309 ]

Matthew T. Adams commented on JDO-589:
--------------------------------------

Time to play name that constant!  How about NontransactionalPersist or NontransactionalMakePersistent?

> Allow makePersistent outside a transaction
> ------------------------------------------
>
>                 Key: JDO-589
>                 URL: https://issues.apache.org/jira/browse/JDO-589
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2
>    Affects Versions: JDO 2 maintenance release 1
>            Reporter: Craig Russell
>
> JPA allows users to call makePersistent outside a transaction, and then when beginning and committing a transaction, the instances are made persistent.
> This is similar to nontransactional dirty in which the managed instances can be modified outside a transaction and then the changes committed within a transaction.
> From the JPA spec, "When an EntityManager with an extended persistence context is used, the persist, remove, merge, and refresh operations may be called regardless of whether a transaction is active. The effects of these operations will be committed to the database when the extended persistence context is enlisted in a transaction and the transaction commits."
> This behavior should not be the default behavior (for backward compatibility reasons if not the principle of least surprise) so it should be under control of a PersistenceManager and PersistenceManagerFactory flag, perhaps NontransactionalNew.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

 « Return to Thread: [jira] Created: (JDO-589) Allow makePersistent outside a transaction

LightInTheBox - Buy quality products at wholesale price!