[
https://issues.jboss.org/browse/JBSEAM-4760?page=com.atlassian.jira.plugi...
]
Peter Brewer updated JBSEAM-4760:
---------------------------------
Description:
This bug only applies when all of the following apply:
1. You have more than one entity manager e.g. "myEntityManager1" and
"myEntityManager2"
2. You have enabled the MEI (e.g. via the distributable="true" attribute on the
init component in components xml)
When performing fail-over from one node to another, the PassivatedEntity class should
re-attached the the entity instance by cycling through each entity manager.
Extract from PassivatedEntity.java
158: for ( String persistenceContextName:
PersistenceContexts.instance().getTouchedContexts() )
159: {
160: Object persistenceContext =
Component.getInstance(persistenceContextName);
161: return createPassivatedEntity(value, entityClass, persistenceContextName,
persistenceContext);
162: }
However, this loop only examines the first touched PersistenceContext and ignores all
others. I have submitted a patch that changes this to:
158: for ( String persistenceContextName:
PersistenceContexts.instance().getTouchedContexts() )
159: {
160: Object persistenceContext =
Component.getInstance(persistenceContextName);
161: PassivatedEntity passivatedEntity = createPassivatedEntity(value,
entityClass, persistenceContextName, persistenceContext);
162: if (passivatedEntity != null) {
163: return passivatedEntity ;
164: }
165: }
was:
This bug only applies when all of the following apply:
1. You have more than one entity manager e.g. "myEntityManager1" and
"myEntityManager2"
2. You have enabled the MEI via the distributable="true" attribute on the init
component in components xml
When performing fail-over from one node to another, the PassivatedEntity class should
re-attached the the entity instance by cycling through each entity manager.
Extract from PassivatedEntity.java
158: for ( String persistenceContextName:
PersistenceContexts.instance().getTouchedContexts() )
159: {
160: Object persistenceContext =
Component.getInstance(persistenceContextName);
161: return createPassivatedEntity(value, entityClass, persistenceContextName,
persistenceContext);
162: }
However, this loop only examines the first touched PersistenceContext and ignores all
others. I have submitted a patch that changes this to:
158: for ( String persistenceContextName:
PersistenceContexts.instance().getTouchedContexts() )
159: {
160: Object persistenceContext =
Component.getInstance(persistenceContextName);
161: PassivatedEntity passivatedEntity = createPassivatedEntity(value,
entityClass, persistenceContextName, persistenceContext);
162: if (passivatedEntity != null) {
163: return passivatedEntity ;
164: }
165: }
PassivatedEntity class only passivates entities belonging to first
entity manager
---------------------------------------------------------------------------------
Key: JBSEAM-4760
URL:
https://issues.jboss.org/browse/JBSEAM-4760
Project: Seam
Issue Type: Bug
Components: Performance and Scalability
Affects Versions: 2.2.1.CR2
Environment: Seam 2.2.1.CR2, JBoss 5.1.0.GA, Windows 7, Java 1.6.0_22 (64-bit)
Reporter: Peter Brewer
Labels: patch
Attachments: PassivatedEntity.java.diff
This bug only applies when all of the following apply:
1. You have more than one entity manager e.g. "myEntityManager1" and
"myEntityManager2"
2. You have enabled the MEI (e.g. via the distributable="true" attribute on the
init component in components xml)
When performing fail-over from one node to another, the PassivatedEntity class should
re-attached the the entity instance by cycling through each entity manager.
Extract from PassivatedEntity.java
158: for ( String persistenceContextName:
PersistenceContexts.instance().getTouchedContexts() )
159: {
160: Object persistenceContext =
Component.getInstance(persistenceContextName);
161: return createPassivatedEntity(value, entityClass, persistenceContextName,
persistenceContext);
162: }
However, this loop only examines the first touched PersistenceContext and ignores all
others. I have submitted a patch that changes this to:
158: for ( String persistenceContextName:
PersistenceContexts.instance().getTouchedContexts() )
159: {
160: Object persistenceContext =
Component.getInstance(persistenceContextName);
161: PassivatedEntity passivatedEntity = createPassivatedEntity(value,
entityClass, persistenceContextName, persistenceContext);
162: if (passivatedEntity != null) {
163: return passivatedEntity ;
164: }
165: }
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira