Only PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT,
PERSISTENCE_CONTEXT_PERSIST_ON_COMMIT, PERSISTENCE_CONTEXT_FLUSH_MODE, VALIDATE_EXISTENCE and FLUSH_CLEAR_CACHE are allowed
once an EntityManager has been created.
The message of the illegal argument should state that the property is
not valid at this point in the lifecycle of the EntityManager.
--Gordon
Darani Yallapragada wrote:
Hello All:
I am trying to implement 'setProperty(Object,Value)' method of EM API.
I have few questions about the implementation :
We have following properties that are
supported properties in EM:
JOIN_EXISTING_TRANSACTION
PERSISTENCE_CONTEXT_REFERENCE_MODE
PERSISTENCE_CONTEXT_CLOSE_ON_COMMIT
PERSISTENCE_CONTEXT_PERSIST_ON_COMMIT
PERSISTENCE_CONTEXT_FLUSH_MODE
ORACLE_PROXY_TYPE
EXCLUSIVE_CONNECTION_MODE
EXCLUSIVE_CONNECTION_IS_LAZY
JTA_DATASOURCE
NON_JTA_DATASOURCE
JDBC_DRIVER
JDBC_URL
JDBC_USER
JDBC_PASSWORD
CONNECTION_POLICY
VALIDATE_EXISTENCE
FLUSH_CLEAR_CACHE
In the above, 'JDBC_DRIVER', 'JDBC_USER',
'JDBC_URL', 'JDBC_PASSWORD' cannot be changed once the connection is
already made.
According to the Spec, if the 'value' is not valid , it
has to throw
'IllegalArgumentException.' I understand that we got to first check for
properties that should not
be changed using 'setProperty() ? What are those properties that should
not be changed using 'setProperty()'
And also, does changing any of the properties throw
only 'IllegalArgumentException' ?
Thank You
Regards
Darani
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
|