1 Reply Latest reply on Nov 4, 2007 7:48 PM by shane.bryzak

    Remoting behaviour

    cfthomas

      Hi!

      I'm developing a SEAM remoting app, so all things on the client side are done in JS and SEAM just handles remoting calls.

      I'm using SLSB on the server that look like this:

      @Stateless
      public class MySLSB {
       private String prop1;
       ..
       @WebRemote
       public String getProperty() { return prop1; }
      }
      


      I have no @Name or @Scope annotation because I use many different instances of the same type like this:
      <component name="x1" class="acme.MySLSB" scope="STATELESS">
       <property name="prop1">value1</property>
      </component>
      
      <component name="x2" class="acme.MySLSB" scope="STATELESS">
       <property name="prop1">value2</property>
      </component>
      


      when I do a remoting call like this:
      var x1 = Seam.Component.getInstance('x1');
      x1.getProperty(function(prop1) {
       // do something with prop1
      });
      


      and set a breakpoint on the serverside in my getProperty() method I sometimes get the right configuration (value1 in this case) or the wrong one.
      (When I set logging to DEBUG I see that SEAM is configuring component x1 in both cases though!)


      Two things I recognize here that could be problems:
      * I'm using SLSB with ScopeType.STATELESS
      * I'm not explicitly setting the conversationContextId before doing a remoting call

      Please tell me what I'm doing wrong.
      I'm currently using 2.0.0.CR2 and JBoss 4.2.2

      Thank you,

      Thomas