Title: RE: Implementing wait in EJBs

Nicholas : "I do not see why Thread.sleep(x) would be illegal. It does not spawn any other threads, it simply pauses the current one."

Sriphani : This exactly was where we started off !



Find a some more info below:


-----------------------------------------------------------
> Sriphani Singaraju wrote:

This is just one of the responsibilities of my bean. There are other important responsibilities for B (B is not a startup bean). I guess we are running out of options here !

-----Original Message-----
From: Fabian Crabus [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 9:35 PM
To: Sriphani Singaraju; [EMAIL PROTECTED]
Subject: AW: Re: Implementing wait in EJBs


 
ok, don't use an ejb for this...
how about simple external java class (implemented as a startup class or whatever) which is
allowed to handle threads...

-------------------------------------------------------------
> Sriphani Singaraju wrote:

"I'm not sure how long application servers are prepared to wait for a bean method to complete" - This concerns me too.

There could be a max. of abt five instances of B at any given time - Though usually it would be one at a time and not all the time. I mean to say that B's instances come by only rarely. So, "multiple Bean B instances hogging server threads" may not be of a great concern.

Regards,
Sriphani.
 

-----Original Message-----
From: Ian McCallion [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 9:23 PM
To: Sriphani Singaraju
Subject: Re: [EJB-INT] Implementing wait in EJBs


> Sriphani Singaraju wrote:
>
> Actually, I should have been more specific. In my case, Bean A is a legacy
> component(Neither any assumptions nor any tampering Bean A). So, I feel that
> the resources pointed to, may not be applicable for this. As Bean B, do I have
> any other options than busy-waiting ??

This approach concerns me. I'm not sure how long application servers are
prepared to wait for a bean method to complete - but sure as anything having
multiple Bean B instances hogging server threads that way will upset a busy
server considerably.

How many Bean B instances are there, and what are Bean B's clients doing - could
they poll instad of the bean?

cheers... Ian

========================================
Ian McCallion
Alexis Systems Limited
Romsey, UK
Tel: +44 1794 514883
Fax: +44 1794 501692
========================================

-----Original Message-----
From: Nicholas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 10:06 PM
To: [EMAIL PROTECTED]
Subject: Re: Implementing wait in EJBs


It seems to me that implementing a try/wait loop is a
highly sketchy way of doing this. I quite like the JMS
solution, but technically, I believe the sketchiness
is not prohibited. In leiu of some highbrow quote from
the EJB spec, my understanding is that you
cannot/should not spawn additional threads. So.... on
that basis, I do not see why Thread.sleep(x) would be
illegal. It does not spawn any other threads, it
simply pauses the current one.

Am I off base here ?

//Nicholas

--------------------------------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed. If you have received this email in error please notify the
originator of the message or [EMAIL PROTECTED]

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of Huawei Technologies India Pvt. Ltd.

Reply via email to