Hello,
We had a similiar problem and we solved it using RMI + EJBs (all of them as
server objects, with WebLogic 5.1). Be careful because if you call a method
of an EJB that never returns (for example, your background process, I
suppose )... you will hang up this EJB on your server, and it won't be
accessed from any client. This is the reason because of we've used RMI: the
RMI object runs "the background process". It's easy to call an EJB from the
RMI object and viceversa. And it's very easy to implement Singleton pattern
with RMI, but not with EJB (I think).
I hope, it will be useful for you.
Luis F. Canals
CEDETEL, Spain
-----Mensaje original-----
De: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]En nombre de Ajay Jain
Enviado el: jueves 15 de junio de 2000 11:27
Para: [EMAIL PROTECTED]
Asunto: Re: Threads in weblogic server
Hi,
Thanks for reply. The purpose of this thread is to receive a message and
call certain method of EJBs depending upon the nature of the message. This
thread needs to run with in the weblogic server or as a separate process.
If this thread runs as a separate process then effectively the process
containing the thread will be a client to the weblogic server. Can you tell
me if a weblogic client has similar restrictions on multithreading as a
weblogic server. In case there are no restrictions, I think my problem is
solved.
Thanks
Ajay
> -----Original Message-----
> From: EXT Suryanarayana Murthy
> [mailto:[EMAIL PROTECTED]]
> Sent: 15. June 2000 11:34
> To: [EMAIL PROTECTED]
> Subject: Re: Threads in weblogic server
>
>
> I think your problem is not related to WebLogic server. You
> need to write a
> seperate class either implements Runnable or extends thread.
> In that you can
> write your polling code which can run in back ground for you
> doing your
> work. Hope this soves your problem.
> I think your background process need not do anything with EJBs. I have
> written similar kind of class which writes continuiously in to a file
> whenever there are some messages written by users. Your class
> should be a
> singleton.
>
> If I am wrong anywhere, please correct me.
>
> Thanks,
> Murthy
>
> > -----Original Message-----
> > From: Ajay Jain [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, June 15, 2000 1:06 PM
> > To: [EMAIL PROTECTED]
> > Subject: Threads in weblogic server
> >
> > Hi Guys,
> >
> > I am using BEA weblogic server 5.1 to develope an EJB
> Application.As a
> > part
> > of the design I am supposed to poll for certain messages by
> calling a
> > third
> > party library method repititively. This activity needs to
> be done in the
> > background and as such requires a separate dedicated thread.
> >
> > My question is whether one can use dedicated thread in
> weblogic server as
> > multithreading is under container's control.Has anybody tried such a
> > thing?
> >
> > If using a dedicated thread is not possible then is there any other
> > alternative to such a problem. Looking forward to your help.
> >
> > Ajay Jain
> >
> >
> ==============================================================
> ============
> > =
> > 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".
>
===========================================================================
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".
===========================================================================
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".