[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - MultipleDataSelection and problem with merge

yohann49 do-not-reply at jboss.com
Thu Jul 19 08:58:10 EDT 2007


Hi everybody !

I currently develop an enterprise application able to manage a client's account(he could see his orders, line orders and product in assocation with those lines). I use netbeans, glassfish, seam and hibernate. I want to post many datalist with link. I use Conversation and Session for that. I want to know if it possible to use many DataModeleSelection.

Otherwise theirs is a problem with my ServerManger : 

first page : login
second : list of orders
third : list of lines
forth : list of server concerned by the lines


  | 
  | Code of my forth page 
  | Stateful
  | @Name("ServerManager")
  | 
  | public class ServerManager implements ServerManagerLocal
  | {
  |    
  |         
  |     @In
  |     private EntityManager em;
  |     
  |     @DataModel
  |     @In(required=false) @Out(required=false)
  |     List<Server> servs;
  |     
  |     
  |     @DataModelSelection
  |     @Out(required=false)
  |     private Server currentServer;
  |     
  | 
  |     private OrderLine myOrderLine;
  |        
  |     
  |     @Factory(value="servs",scope=CONVERSATION)
  |     public void searchServers (){
  |               
  |         
  |         servs = myOrderLine.getServers();
  |         
  |        
  |     }
  |     
  |     
  |     @Begin(join=true)
  |     public void viewParameters(OrderLine orderLine){ 
  |         System.out.println("on rentre dans le server manager");
  |         myOrderLine=em.merge(orderLine);
  | 
  |             
  |     }
  |     
  | 
  |         
  |     
  |     
  |     @Remove @Destroy
  |     public void destroy(){
  |     }
  | 
  |     public List<Server> getServs() {
  |         return servs;
  |     }
  | 
  |        
  | 
  |     public Server getCurrentServer() {
  |         return currentServer;
  |     }
  | 
  |     public void setCurrentServer(Server currentServer) {
  |         this.currentServer = currentServer;
  |     }
  | 
  |     public OrderLine getMyOrderLine() {
  |         return myOrderLine;
  |     }
  | 
  |     public void setMyOrderLine(OrderLine myOrderLine) {
  |         this.myOrderLine = myOrderLine;
  |     }
  | 
  |     
  | }
  | 
  | 

And in my debug page I have this exception

javax.ejb.EJBTransactionRolledbackException

com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
org.jboss.seam.core.Expressions$2.invoke(Expressions.java:148)
org.jboss.seam.core.Pages.callAction(Pages.java:499)
org.jboss.seam.core.Pages.enterPage(Pages.java:282)
org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276)
org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214)
org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:258)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:189)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:193)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:255)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)

If anybody could answer please ?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065771#4065771

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065771



More information about the jboss-user mailing list