[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-267?page=co...
]
James Woodward commented on EJB-267:
------------------------------------
I am using JBoss 4.0.5 which I installed using the ejb3 profile of
jems-installer-1.2.0.GA.jar.
I have then replaced the bundled hibernate 3.2.0.GA jar files
jboss-4.0.5.GA\server\default\lib\hibernate3.jar
jboss-4.0.5.GA\server\default\lib\hibernate-annotations.jar
jboss-4.0.5.GA\server\default\lib\hibernate-entitymanager.jar
with the latest versions downloaded from
http://www.hibernate.org/6.html
Hibernate 3.2.2.GA
Hibernate Annotation 3.2.1.GA
Hibernate Entity Manager 3.2.1.GA
Is it ok updating the jars like this in JBoss?
Is there anything else I need to do?
FlushMode.MANUAL being ignored???
---------------------------------
Key: EJB-267
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-267
Project: Hibernate Entity Manager
Type: Task
Components: EntityManager
Versions: 3.2.2
Environment: Hibernate Entity Manager 3.2.1.GA
Reporter: James Woodward
The following code is advocated as best practice in the book "Java Persistence with
Hibernate" for creating an extended persistence context in a SFSB, but the
persistence property is currently being ignored.
@PersistenceContext(type=PersistenceContextType.EXTENDED,
properties=(a)PersistenceProperty(name="org.hibernate.flushMode",
value="MANUAL"))
private EntityManager entityManager;
As a workaround you can set the flushMode in a business method using the following code:
public void init() {
org.hibernate.Session session = ((org.jboss.ejb3.entity.HibernateSession)
entityManager).getHibernateSession();
session.setFlushMode(org.hibernate.FlushMode.MANUAL);
}
See
http://forum.hibernate.org/viewtopic.php?t=970727 for details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira