I think I have identified your problem.
> I believe, I do need the synchronized capability not only for private case
> but also for public methods in session EJB.
> I created an "almost real life" scenario that illustrates the need for synch
> capability.
> You can read the code but here summary.
> I have a designed a class (Complex) that was to be used by multiple
> threads.
> The class Complex has own variables, which are not stored in database.
> I have two threads that theoretically could be on different machines and
> know nothing about each other.
> Consequently, I implemented "set" and "print" methods with synch.
> If I did not, I could get inconsistent results.
>
> Now my boss came to me and said that she wants the class to be implemented
> as EJB service.
Here's your problem. Your boss "told you so". Yeah. Right.
Look, your code is not at all suited as an EJB. I would imagine that
Complex objects could be *used* by EJB's, but it should not be an EJB by
itself.
What is the reason you want it as an EJB? What does it solve that it
doesn't solve on its own?
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.dreambean.com
Question reality
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".