Iacturus wrote:

That's the mechanism currently used to flag whether a component is to be treated as a singleton. Why wouldn't it be possible?


The problem is, that i need to have exclusive access on object (component) level. Using the Threadsafe interface will cause the need of java synchronization:


synchronized (myComponent) {
    myComponent.doSomething1();
    myComponent.doSomething2();
}

This is in any case a bottleneck, but i intended to delegate this to the component manager. My component is not thread safe and it is not possible to make it thread safe.

Thx, Robert

Robert,

You have me totally confused. Singletons, by their nature, must be thread safe as there is only one instance of the object acting on behalf of everyone. So if you want a singleton then you have to synchronize if necessary. The alternative is to create multiple objects to handle each request.

I don't see how delegating the non-thread-safe activity to a component manager solves the problem.

Ralph


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