[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-777) Subsequent Remoting-Calls loose conversation-context.

Shane Bryzak (JIRA) jira-events at lists.jboss.org
Wed Mar 21 21:39:49 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-777?page=all ]

Shane Bryzak closed JBSEAM-777.
-------------------------------

    Resolution: Cannot Reproduce Bug

Closed.

> Subsequent Remoting-Calls loose conversation-context.
> -----------------------------------------------------
>
>                 Key: JBSEAM-777
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-777
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Remoting
>    Affects Versions: 1.1.5.GA
>         Environment: jboss-4.0.4.GA, WinXP, jdk1.5.0_06
>            Reporter: Stefan Frank
>         Assigned To: Shane Bryzak
>
> Subsequent calls to a StatefulSessionBean which has methodes exposed via @WebRemote loose their conversation-context. 
> The Scenario:
> User loads Page with a Multiple-Choice-Test. All questions are fetched from the server, each question is setup via javascript on the client. Each answer is sent to the server. At the end of the test, we redirect to a page to display the test-results.
> We try to implement this using:
> - Seam.Remoting to make up the Connection
> - Javascript to setup the questions
> - A stateful session Bean to hold the test and the results.
> - A conversation to demarcate start and end of the test.
> The problem is, that the remoting does not reconnect to the SSB, but instead starts new SSB's. Here is a rough sketch of the code: 
> @Stateful
> @Name ("examManager")
> @Scope(ScopeType.SESSION)
> public class ExamManagerBean implements ExamManager {
>        
>         @Begin
> 	public Test startTest(int testId) {
>               ....
>         }
>   
>         public void sendAnswer(int questionId, int answerId){
>                ....
>         }
>         @End
> 	public String getResults(){
> 		...;
> 	}
> }
> the javascript:
> var remoteManager = Seam.Component.getInstance("examManager");
> remoteManager.startTest(id, testLoaded)
> function testLoaded(test){
>       setupNextQuestion(test);
>       ....
> }
> function evaluateAnswer(){
>       remoteManager.sendAnswer(test.questions[questionIdx].id, answerId, answerCallback);
>       ....
> }
> The Test is fetched correctly and the first two calls to remoteManager.sendAnswer go to the same SSB with which the Test was started, the third call triggers the create of a new SSB and fails becaus the startTest() was never called and therefore the test not initialized. 
> It appears, that conversation-context is lost and a new Conversation started.  Calls to Seam.Remoting.getContext().getConversationId() confirm, that the Conversation-Context is still correct in the client. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list