Discussions

EJB design: Static methods in Transfer Object

  1. Static methods in Transfer Object (3 messages)

    Hi all,
    I have a doubt about Transfer Object:

    Is it possible to have a static method (or field)
    inside a Transfer Object returned from
    a Session Bean to a Client ?

    Many thanks in advance,
    Moreno
  2. Yes.
    A static field will not be serialized when the transfer object is returned, so don't expect that after returning the transfer object the static fields will also be updated.

    Gal
  3. Static methods in Transfer Object[ Go to top ]

    Hi,

    It seems to be possible - but I don't see the point with a static field in a class defining the Transfer Object.

    Regards,
    Tomas
  4. Static methods in Transfer Object[ Go to top ]

    I had a class that I needed to change in a Transfer Object.

    Tha class had defined the static method and so I wasn't sure that
    I had to modify this method.

    Hi,
    Moreno