users@glassfish.java.net

Re: How to "instantiate the LAZY relationship prior to serialization"

From: <glassfish_at_javadesktop.org>
Date: Tue, 21 Aug 2007 10:58:41 PDT

Hi Marina,

So I changed my Stateless Session Bean to have the following method

    public List<Employee> getEmployeesByManagerId(Long managerNo) {
        List<Employee> employees = getManagerById(managerNo).getEmployeeList();
        return employees;
    }

As you see it now returns employees that particular manager manages.

And in my standalone client, I am calling the following

...
            List<Employee> employees = sessionEJB.getEmployeesByManagerId(new Long(1));
            for(Employee e:employees) {
                  ...
            }

Is this correct?

Thanks,

Mustafa
[Message sent by forum member 'mcayci' (mcayci)]

http://forums.java.net/jive/thread.jspa?messageID=231859