[JBoss Seam] - access the entityManager in a converter (seam 2 beta)
by adrien.loyat
Hello
In seam 1.3 alpha, I use the entityManager in a converter (in getAsObject) like this :
public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
| if (StringUtils.isEmpty(arg2)){ return null;}
| log.info("getAsObject avec arguement #0", arg2);
|
| TypecolList typecolList = (TypecolList) Component.getInstance("typecolList");
| if (typecolList == null ) {
| log.info("typecolList est null");
| return null;
| }
| EntityManager em = typecolList.getEntityManager();
| Typecol typecol = em.find(Typecol.class, Integer.parseInt(arg2) );
|
| return typecol;
| }
|
I am a newbie and I know this code is not clean.
With seam 2 beta, It raises an exception: EntityManager is closed.
So my question is : how can I access to my entities without using the EntityManeager ? or How can I have access to the entity Manager ?
Best Regards
Adrien
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058633#4058633
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058633
18Â years, 9Â months
[JBoss jBPM] - Re: async pain
by ax666
with 3.2.1 :
anonymous wrote : 11:19:01,985 [pool-1-thread-1] DEBUG GraphElement - event 'node-leave' on 'Node(fileCheck)' for 'Token(/)'
| 11:19:02,003 [pool-1-thread-1] DEBUG GraphElement - event 'transition' on 'Transition(check-to-fork)' for 'Token(/)'
| 11:19:02,006 [pool-1-thread-1] DEBUG GraphElement - event 'node-enter' on 'Fork(fork1)' for 'Token(/)'
| 11:19:02,010 [pool-1-thread-1] DEBUG DbMessageService - saved job[2, org.jbpm.job.ExecuteNodeJob]
| 11:19:02,012 [pool-1-thread-1] DEBUG Token - token[1] is unlocked by token[1]
| 11:19:02,024 [pool-1-thread-1] ERROR GraphElement - action threw exception: token '1' can't be locked by 'job[2]' cause it's already locked by 'token[1]'
| org.jbpm.JbpmException: token '1' can't be locked by 'job[2]' cause it's already locked by 'token[1]'
| at org.jbpm.graph.exe.Token.lock(Token.java:646)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058631#4058631
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058631
18Â years, 9Â months
[Installation, Configuration & Deployment] - jboss 4.2 and log4j nightmare
by meissa
Hi jboss guys,
We are been more and more to suffer about the Impossibility to override
log4j.jar in jboss 4.2 version.
The classloading isolation configuration that is explained in the wiki is not working at all.
Jboss still complain when we put log4j.jar in our appllications librairies.
Can you please,please,please give to us a real solution to get rif of this problem.
Removing log4j.jar from our librairies is not a solution.
here is the well known exption trace:
| log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
| log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
| log4j:ERROR [WebappClassLoader
| delegate: false
| repositories:
| /WEB-INF/classes/
| ----------> Parent Classloader:
| java.net.FactoryURLClassLoader@18c10af
| ] whereas object of type
| log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@1a33d48].
| log4j:ERROR Could not instantiate appender named "FILE".
|
Any help is greetly appreciated.
Meisssa
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058630#4058630
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058630
18Â years, 9Â months