CMR and weblogic


EJB programming & troubleshooting: CMR and weblogic

  1. CMR and weblogic (2 messages)

    We have 2 tables EMPLOYEE and TIME_ENTRIES with the latter storing multiple timesheet entries for each employee entry.
    The relation is defined in ejb-jar as follows:



    The weblogic-cmp-rdbms-jar file has the following entry:



    Now we do a simple iteration on the returned collection as follows:
    public Collection getAllTimeSheets()
    Collection tscoll = getTimeSheets();
    Iterator i = tscoll.iterator();
    TimeSheet t=(TimeSheet);
    p.println("data $$" + t.getHours());

    Collection tsCopy = new ArrayList(tscoll);
    return tsCopy;

    The getTimeSheets returns the correct number of records , but they are all repetitions of the first record.What is wrong?

    Threaded Messages (2)

  2. CMR and weblogic[ Go to top ]

       can you please paste the SQl here and use set in place of collection so that the duplicate records will not come. Well changing it to set won;t solve the problem but the SQl query can put more light on it .

  3. CMR and weblogic[ Go to top ]

    Since i have defined the 2 ejbs through a CMR realtionship;my idea was that i need not put any additional QL for that.
    The relationship as defined in ejb-jar has alreayd been posted in the original post