Announcement Announcement Module
No announcement yet.
General Question Spring 3.0, Passed Objects Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • General Question Spring 3.0, Passed Objects

    I have a general question about how spring works.

    I recently upgraded a project written for Spring 2.x, Java 1.5, and Tomcat 5.5 to work with Spring 3.x, Java 6 and the Virgo Web Server. I found that the new platform treats a piece of the code differently.

    I have some (admittedly bad) code

    public class UserJdbc implements UserDao {
    public int save(User user) {

    .. get some stuff from user...
    .. save stuff to db...


    return user.getUserID();

    The trouble is that the user object will not allow me to set it's properties in certain instances.
    I know I shouldn't be bothering to set it's properties, and I'm in the process of changing that code... but I'm wondering why this happens.

    If I call an instance of UserDao directly from a Service (UserService), I can set the properties. However, if UserService calls another service, PersonService, which then calls on UserDao, the properties of the passed in object cannot be changed. Why is this happening?

  • #2
    100%, disregard this message. Some code refactoring went awry resulting in misnaming this was the obvious implication of aforementioned misnaming.