-
1. Re: Failure to create and deploy a Seam project using the ne
christian.douven Aug 23, 2007 4:02 AM (in response to tamirw)Maybe this helps you:
http://jboss.org/index.html?module=bb&op=viewtopic&t=116016 -
2. Re: Failure to create and deploy a Seam project using the ne
tamirw Aug 23, 2007 4:34 AM (in response to tamirw)Looks like I'm not the only one ...
It also looks like this problem isn't 100% solved yet.
Perhaps someone can offer a bypass, then.
I want my Action classes to be able to use Entities (Entity beans). Is there a way to get this functionality without using Session Beans ? (right now I'm getting an Exception if I'm trying to use@PersistenceContext
in a Action that is not a SB).
If I can do that, I could use simple POJO's instead of SLSB. -
3. Re: Failure to create and deploy a Seam project using the ne
wise_guybg Aug 23, 2007 4:51 AM (in response to tamirw)You can use SMPC (Seam Managed Persistence Context if I'm right) using the @In and the correct field name. Example:
@In EntityManager entityManager;
-
4. Re: Failure to create and deploy a Seam project using the ne
tamirw Aug 23, 2007 5:56 AM (in response to tamirw)I must be missing something ...
If I try what you suggest, then the EntityManager would still be : javax.persistence.EntityManager, and at runtime, it fails with :
org.jboss.seam.RequiredException: In attribute requires non-null value: register.em
What am I doing wrong ? -
5. Re: Failure to create and deploy a Seam project using the ne
wise_guybg Aug 23, 2007 6:00 AM (in response to tamirw)Name the field in the "register" component entityManager not em.
-
6. Re: Failure to create and deploy a Seam project using the ne
wise_guybg Aug 23, 2007 6:04 AM (in response to tamirw)I've had some configuration issues when porting my application from Seam 1.2.1.GA, where I had an entity manager named "em", to Seam 2.0.0.BETA1. I decided to simply name the fields entityManager. This way no additional configuration is needed to have it bijected everywhere in the framework and you application.
-
7. Re: Failure to create and deploy a Seam project using the ne
tamirw Aug 23, 2007 6:19 AM (in response to tamirw)That worked !!
Thanks a lot.
So now that I can have entity access in my POJO actions, is there any point in insisting to use SLSB (once the Studio\Seam\AS bug is fixed) ? -
8. Re: Failure to create and deploy a Seam project using the ne
tamirw Aug 23, 2007 6:35 AM (in response to tamirw)One more question (I guess I'll have more, as I find more and more things that need be adjusted as a result of this change) :
Previously, the container was responsible for generating the DDL and keeping the DB schema with my entity classes.
Now that I've switched to using just Hibernate, how do I tell it to do the same thing ? -
9. Re: Failure to create and deploy a Seam project using the ne
tamirw Aug 23, 2007 6:53 AM (in response to tamirw)I guess that's not the problem ...
The schema does get updated by Hibernate, but still I'm getting the following exception :javax.faces.el.EvaluationException: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [select u from User u where u.name=:el1 and u.active = true]
-
10. Re: Failure to create and deploy a Seam project using the ne
wise_guybg Aug 23, 2007 7:11 AM (in response to tamirw)Here is a thread from today on session beans and seam components:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116783
About switching to just Hibernate I'm not OK with that. What have you changed in you configuration? You should stick to JPA with Hibernate as the persistence provider