> This answer doesn't make sense to me. Either you can use a hashtable in an entity 
>bean or you
> cannot.   Why should I worry about threads now?

Don't worry, just use it and be happy, but if you want to be on the safe
side, you should consider the 1.2 collections.

arkin

>
> >
> > If you use a Vector or Hashtable from one thread and something happens
> > to your thread inside the synchronized stuff, your Hashtable/Vector
> > might be corrupted. But you shouldn't care. IF something happens to your
> > thread, the EJB server will discard that bean (always).
> >
> > If you are using two threads and something happens to thread A that
> > leaves the Vector in an indeterminate state, then thread B might break
> > and you have no control over that.
> >
> > I've just implemented some piece of the CMP engine that manages locks
> > using synchronized. I expect that something might happen to the thread
> > since the EJB server controls it, and have extra (even redundant) code
> > just to make sure that never happens.
> >
> > In the Java 1.2 collections Sun addressed that by writing the collectors
> > so they do not rely on synchronized.
> >
> > arkin
> >
> > >
> > > Cheers,
> > > Laird
> > >
> > > ===========================================================================
> > > 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".
> >
> > --
> > ----------------------------------------------------------------------
> > Assaf Arkin                                           www.exoffice.com
> > CTO, Exoffice Technologies, Inc.                        www.exolab.org
> >
> > ===========================================================================
> > 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".
>
> ===========================================================================
> 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".

--
----------------------------------------------------------------------
Assaf Arkin                                           www.exoffice.com
CTO, Exoffice Technologies, Inc.                        www.exolab.org

===========================================================================
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".

Reply via email to