[seam-issues] [JBoss JIRA] Commented: (JBSEAM-3493) Incompatibilty between PerNestedConversation and ManagedEntityInterceptor detected when trying to create a CRUD for a reflective 1-n associations

Salim OFLAZ (JIRA) jira-events at lists.jboss.org
Wed Apr 14 10:36:27 EDT 2010


    [ https://jira.jboss.org/jira/browse/JBSEAM-3493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12525654#action_12525654 ] 

Salim OFLAZ commented on JBSEAM-3493:
-------------------------------------

Hi,
I found a solution to this problem. Let me describe my solution; I have the parent and child departments, a recursive ent,ty mapping. In the TaDepartmentHome class I wrote the wire as follows;

@In(create = true)
	TaDepartmentHomeLocal taDepartmentHome;

public void wire() {
		TaDepartment parentDepartment = taDepartmentHome.getDefinedInstance();
		if (parentDepartment != null) {
			if (isIdDefined()) {
				setId(null);
				getInstance();
				getInstance().setTaDepartment(parentDepartment);
				
			}
			else {
				getInstance();
				getInstance().setTaDepartment(parentDepartment);
			}
		}
		else
			getInstance();
	}


public boolean isWired() {
		return true;
	}

It seems to be working, At least I guess So. I welcome the comments from the community. 

> Incompatibilty between PerNestedConversation and ManagedEntityInterceptor detected when trying to create a CRUD for a reflective 1-n associations
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-3493
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3493
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.2.SP1, 2.1.0.SP1
>            Reporter: Francisco Jose Peredo Noguez
>         Attachments: SeamRecursionTestCase.zip, SeamRecursionTestCase.zip
>
>
> I have a reflective 1-n associations e.g. Person child of Person.
> I would like to create a child from the PersonEdit.xhtml created by seam-gen then adapted by hand.
> When I put @PerNestedConversation annotation to my PersonHome the behavior seems to be ok. Each conversation has it's own instance of PersonHome. BUT all of those instances is wired to the same instance of Person (the Entity)...
> I've tried to trace modifications on the "instance" field of Home but it's never set; it should stay to null and then call createInstance() but this never happen because the Person instance is the same as the parent conversation one.
> Update for  Seam 2.1.0SP1: If I ManagedEntityInterceptor is disabled (default configuration now) this problem disappears (and of course it returns if I re-enable it in components.xml). This means that the root cause of this problem is that ManagedEntityInterceptor and PerNestedConversation are incompatible.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list