[JBoss Seam] - Trying to understand transactions
by joaobmonteiro
Hi guys,
I am using Seam 1.2 GA + JSF + Apache 6 and I got some problems in handling transactions. I tried hard to find when Seam opens, commit and flushes an transaction during a request without success.
Why Seam commits/flushes a transcation when I do em.find(clazz,id) ?
I have a transient object (an user instance) inside a managed object (Issue instance, for example), so I need to get a managed user instance, for that, I use em.find and I got a really nice Transient Object Exception because someone tryies to flush the transction during em.find.
You could think that I only need to do merge() instead of trying to find() but in my case, the user instance will be always transient because it cames from a legacy system and if it exists in my system I have to merge otherwise I have to insert it.
I solved this problem setting manual flush mode but it is too boring to work with.
Other problem I have is undesirable commits after Ajax requests causing transient object exception.
Anyone knows how to solve these questions in a better way ?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107165#4107165
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107165
18 years, 8 months
[JBoss Portal] - Re: Localizing Tab that has spaces in its name
by syllant
This seems to be clean :-)
But I wish you could redesign -object.xml usage since it's quite confusing.
I'm new to JBP (2 weeks) but I've used other portals. What I miss most in JPB is a import/export module (or backup/restore). There should be a way to redeploy a portal with its content easily. This is why probably many of us use -object.xml files, to keep a externalized definition of portal content.
But my impression is that these descriptors where designed as bootstrappers, i.e. to quickly build a portal core, and not as whole portal definition. This is why there are design issues like this (tab localization), which don't fit this goal.
What I'd like is to keep these descriptors as simple bootstrappers (i.e. without handling localization) and be able to export and import portal : structure, content, configuration, users, ... I've seen this was planned for 2.8, great :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107160#4107160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107160
18 years, 8 months
[JBoss Seam] - Re: @Factory is not working
by maykellff
anonymous wrote :
| You are however not referencing the context variable, but a getter method on another context variable.
|
Please clarify me, what is exactly a "context variable" ?
1- You mean a variable annotated with an Out?
2- A Session bean annotated with a @Name it is not a context variable?
3- In my example i have "expedienteFacadeStateless" that is a stateless session bean annotated with a @Name seam annotation, now i thougth that the property tipoAcusadoRs implicitly become a context variable. i'm wrong?
anonymous wrote :
| (if you had an @Out at the list, the factory would have been called).
|
I did that an i get the following exepction:
java.lang.IllegalArgumentException: Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(j_id_jsp_912580932_7pc2). Found null.
Any suggestion will be very appreciated.Thank you ,
Maykell
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107158#4107158
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107158
18 years, 8 months