[seam-issues] [JBoss JIRA] Commented: (SEAMSECURITY-69) Call to associateGroups(head, branch) does not persist the group relationship

José Freitas (JIRA) jira-events at lists.jboss.org
Mon Aug 15 18:22:02 EDT 2011

    [ https://issues.jboss.org/browse/SEAMSECURITY-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621212#comment-12621212 ] 

José Freitas commented on SEAMSECURITY-69:

It seems that you're right, there's a NPE when disassociating groups.
I'll take a deeper look at it.

> Call to associateGroups(head, branch) does not persist the group relationship
> -----------------------------------------------------------------------------
>                 Key: SEAMSECURITY-69
>                 URL: https://issues.jboss.org/browse/SEAMSECURITY-69
>             Project: Seam Security
>          Issue Type: Bug
>    Affects Versions: 3.0.0.Final
>         Environment: Windows 7 x64, MySQL 5.1
>            Reporter: Bill Elliot
> This is using MySQL 5.1 and it appears the association is not being persisted. If I manually enter the table row the association is detected correctly. But, the call to associateGroups is not persisting the relationship. I have used the following code to test out this: 
> package org.jboss.seam.security.examples.idmconsole.tests;
> import javax.inject.Inject;
> import org.picketlink.idm.api.Group;
> import org.picketlink.idm.api.IdentitySession;
> import org.picketlink.idm.api.PersistenceManager;
> import org.picketlink.idm.api.RelationshipManager;
> import org.picketlink.idm.common.exception.IdentityException;
> public class TestSecurity {
>         @Inject IdentitySession identitySession;
>         public String testAction() throws IdentityException {
>                 PersistenceManager pm = identitySession.getPersistenceManager();
>                 RelationshipManager rm = identitySession.getRelationshipManager();
>                 Group head = pm.findGroup("Head Office", "ORGANIZATION_UNIT");
>                 Group branch = pm.findGroup("Branch Office", "ORGANIZATION_UNIT");
>                 if( ! rm.isAssociated(head, branch) ) {
>                         rm.associateGroups(head, branch);
>                 }
>                 boolean isAssociated = rm.isAssociated(head, branch);
>                 return null;
>         }
> }
> The 2 groups in the test code exist in my test DB when I run the above code. I single step through the code to verify the situation after each line and everything is as expected, except that the call to rm.associateGroups(head, branch); does not persist the association.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list