[JBoss Seam] - Re: Entity Injection question
by stephen.friedrich
I can't really point to a paragraph in the reference where it's explicitly described.
Yet, every example uses components that way: Usually the very first reference to a component is encountered in EL in html/jsp.
When explaining the registration example the 1.2.1 reference says:
anonymous wrote : 1.2.2. How it works
| When the form is submitted, JSF asks Seam to resolve the variable named user. Since there is no value already bound to that name (in any Seam context), Seam instantiates the user component, and returns the resulting User entity bean instance to JSF after storing it in the Seam session context.
(Well, actually I think that's wrong, too. The EL is evaluated first when the form is rendered, so the component gets instantiated even before submit.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090410#4090410
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090410
16Â years, 9Â months
[JBoss Seam] - Logout problem
by srpantano
I am using Seam 2.0Beta1 + Acegi + Spring + Hibernate.
When I try to logout, and I used:
| Session.instance().invalidate()
| ;
| HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);
| session.removeAttribute("ACEGI_SECURITY_CONTEXT");
| session.removeAttribute("ACEGI_SECURITY_LAST_USERNAME");
|
Everything goes berserk, and my EntityManager is killed:
| 16:37:32,369 ERROR [ExceptionFilter] handling uncaught exception
| java.lang.IllegalStateException: EntityManager is closed
| at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:42)
| at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:92)
| at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.createQuery(FullTextEntityManagerImpl.java:130)
| at org.jboss.seam.persistence.EntityManagerProxy.createQuery(EntityManagerProxy.java:79)
| at com.bcsinfo.security.view.web.user.UserList.findUserByUsername(UserList.java:48)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:589)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.se
|
Please Help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090398#4090398
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090398
16Â years, 9Â months