Hi,

we are currently working at an web-application, which is currently single-threaded. For performance reason it is obvious that it should be multi-threaded. We are using OJB as persistence-layer. Now my question: Does anyone has best practices for creating an thread-safe object-model?

Suppose we have the following class:

class Person {
        String getName();

        void setName(String aName);

        void addTeam(Team t);

        Collection getTeams();

        void removeTeam(Team t);
}

What would be the best version of this class? What methods should be synchronized and which methods don't have to be synchronized?

If someone has a hint where I could learn that, I'd really appreciate that.

With regards
Tino


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to