[jboss-user] [JBoss Seam] - Re: where is <h:inputText> going?

dbatcn do-not-reply at jboss.com
Wed Aug 2 14:01:14 EDT 2006


"peteroyle" wrote : 1: Will it help to add create=true to your @In annotation on the BQManagerBean.quux property?

Adding "create=true" causes:

anonymous wrote : 
  | javax.ejb.EJBException: Application Error: no concurrent calls on stateful beans
  | 	at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:71)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:188)
  | 	at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
  | 	at $Proxy489.findQuuxen(Unknown Source)
  | 	...
  | 

with a similar exception on the invocation (?) of the findBazs() method.

If I replace the "required=false" with the "create=true", then I get similar results.

With the original source, if I type a new quux name and press the rename quux button, then

1. Quux.setName() is called with the original value of quux.name (as seen in debug log), and
2. BQManagerBean.commitQuux() sees a null in its class's quux property (get the faces message: "BQManagerBean.commitQuux() called but quux is null!")

It seems to me that some instance of quux is being set, but not the one in BQManagerBean.  Is there a way for an entity EJB to find out what context it's in?

"peteroyle" wrote : 2: Have you tried changing #{namefornewbaz} to #{nameForNewBaz} in bqmgr.xhtml to better match the name of the property on the SFSB? 

That typo was an error on my part as I was trying to create a clean abstraction to post, sorry.  Unfortunately, even when I change it to: anonymous wrote : <h:inputText value="#{nameForNewBaz}"/> I still get "BQManagerBean.createBazSpecifyingName(): nameForNewBaz is null!", showing that the value is never injected for "nameForNewBaz".  The log shows that Seam is unable to find it:

anonymous wrote : 
  | 2006-08-02 10:08:36,423 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: nameForNewBaz
  | 2006-08-02 10:08:36,423 DEBUG [org.jboss.seam.Component] seam component not found: nameForNewBaz
  | 2006-08-02 10:08:36,423 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: nameForNewBaz
  | 2006-08-02 10:08:36,423 DEBUG [org.jboss.seam.Component] seam component not found: nameForNewBaz
  | 2006-08-02 10:08:36,423 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
  | 2006-08-02 10:08:36,423 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] could not resolve name
  | 

"quux" does seem to be found in the conversation context:

anonymous wrote : 
  | 2006-08-02 10:25:38,578 DEBUG [org.jboss.seam.interceptors.ConversationInterceptor] Beginning long-running conversation
  | 2006-08-02 10:25:38,578 DEBUG [org.jboss.seam.Component] instantiating Seam component: conversation
  | 2006-08-02 10:25:38,593 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: quux
  | 2006-08-02 10:25:38,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: quux
  | 2006-08-02 10:25:38,593 DEBUG [org.jboss.seam.contexts.Contexts] found in conversation context: quux
  | 2006-08-02 10:25:38,593 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
  | 

Is it possible that there are multiple conversations and my code is in the wrong one?

"bfo81" wrote : As far as I know there's a mistake in the documentation. The default scope is not Conversation but Event -> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=86491 - but I'm not sure if this only concerns normal JavaBeans (as shown in that topic's title) or also EJBs. 

As long as the log isn't lying, I think my components are getting conversation scope:

anonymous wrote : 
  | 2006-08-02 10:25:12,481 INFO  [org.jboss.seam.Component] Component: quux, scope: CONVERSATION, type: ENTITY_BEAN, class: com.orgmob.play.Quux
  | ...
  | 2006-08-02 10:25:12,513 INFO  [org.jboss.seam.Component] Component: bqManager, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: com.orgmob.play.BQManagerBean, JNDI: member/BQManagerBean/local
  | ...
  | 2006-08-02 10:25:12,528 INFO  [org.jboss.seam.Component] Component: baz, scope: CONVERSATION, type: ENTITY_BEAN, class: com.orgmob.play.Baz
  | 


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

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



More information about the jboss-user mailing list