[seam-commits] Seam SVN: r13442 - in modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management: picketlink and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jul 19 02:59:49 EDT 2010
Author: shane.bryzak at jboss.com
Date: 2010-07-19 02:59:49 -0400 (Mon, 19 Jul 2010)
New Revision: 13442
Modified:
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStore.java
Log:
fiddling with transaction stuff
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java 2010-07-19 06:25:35 UTC (rev 13441)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/action/GroupAction.java 2010-07-19 06:59:49 UTC (rev 13442)
@@ -4,12 +4,11 @@
import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
-import javax.enterprise.inject.Instance;
import javax.inject.Inject;
import javax.inject.Named;
-import org.jboss.seam.security.GroupImpl;
import org.jboss.seam.persistence.transaction.Transactional;
+import org.jboss.seam.security.GroupImpl;
import org.picketlink.idm.api.Group;
import org.picketlink.idm.api.IdentitySession;
import org.picketlink.idm.common.exception.IdentityException;
@@ -23,28 +22,28 @@
{
private static final long serialVersionUID = -1553124158319503903L;
- //@Inject Conversation conversation;
+ @Inject Conversation conversation;
- //@Inject IdentitySession identitySession;
+ @Inject IdentitySession identitySession;
private String groupName;
private String groupType;
public void createGroup()
{
- // conversation.begin();
+ conversation.begin();
}
public void deleteGroup(String name, String groupType) throws IdentityException
{
Group group = new GroupImpl(name, groupType);
- // identitySession.getPersistenceManager().removeGroup(group, true);
+ identitySession.getPersistenceManager().removeGroup(group, true);
}
public String save() throws IdentityException
{
- //identitySession.getPersistenceManager().createGroup(groupName, groupType);
- //conversation.end();
+ identitySession.getPersistenceManager().createGroup(groupName, groupType);
+ conversation.end();
return "success";
}
}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStore.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStore.java 2010-07-19 06:25:35 UTC (rev 13441)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/picketlink/JpaIdentityStore.java 2010-07-19 06:59:49 UTC (rev 13442)
@@ -1075,8 +1075,10 @@
//beanManager.fireEvent(new PrePersistUserEvent(identityInstance));
- getEntityManager(ctx).persist(identityInstance);
+ EntityManager em = getEntityManager(ctx);
+ em.persist(identityInstance);
+
//beanManager.fireEvent(new UserCreatedEvent(identityInstance));
// TODO persist attributes
More information about the seam-commits
mailing list