2 Replies Latest reply on Apr 22, 2008 2:06 AM by Neelima S

    Unable to get correct data using Remote interface getter met

    Neelima S Newbie

      I am using JBoss 4.0.5 along with stateless session beans (EJB 3.0).

      I have a Remote interface ExperimentInf (annotated by @Remote).
      ExperimentModel class implements the above Interface and is annotated
      as
      @Stateless
      @EJB(name="ExperimentInf",mappedName="ExperimentModel")

      ExperimentModel has class variables eg. sampleNames with getter and setter methods.
      From my view class, I call getData() method using ExperimentInf reference. This method reads data from a mysql databse and sets them the class variables (eg sampleNames).

      ExperimentInf experimentInf = (ExperimentInf)GenowizFactory.getFactoryHome("ExperimentModel");
      status = experimentInf.getData(experimentID) ;

      But when i retrieve the class variables that were set using
      experimentInf.getSampleNames();
      the data retrieved belongs to the previous instance( when similar operation was performed earlier).
      Sysouts given inside getData() method give correct output

      I hope I have described the scenario clearly. Please help.