I call this pattern a gateway - a separate process accepting input from the
outside world and then passing the input through to a Session Bean.
Absolutely no restrictions - it is just a client of the AppServer.
Deployment is a little more complex - you have to ensure the process is
continually running (or is restarted when/if it dies), and you have to
recover if the AppServer goes away and restarts.
Weblogic has a (vendor specific) mechanism for starting specified Java
'apps' when the AppServer starts (startup classes?).
I have this mechanism in (serious) production environments, using HP
OpenView to control re-starts etc. (other app managers would also be fine).
tim
> -----Original Message-----
> From: Lou Bona [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, June 15, 2000 1:36 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Threads in weblogic server
>
> I think you misunderstood, or maybe I did, but I thought the question
> became:
> can a client calling an EJB
> be running in a thread?
>
> I can't see any reason the server would even be aware that the calling
> process
> is running in a thread
> separate from the main thread of a client application (in a different VM).
> Or
> that the multiple clients
> hitting it are all spawned from the same process. However, my experience
> is
> limited to weblogic and
> I don't have the spec handy.
>
> Any insight is always appreciated,
>
> Lou Bona
> Chief Software Architect
> agentGo.com
>
>
> parikshit wrote:
>
> > That is because WebLogic is linient towards the programming restrictions
> in
> > EJBs(It allows threading and IO operations in EJBs). But your EJBs will
> not
> > be portable across EJB Servers(they will give some exceptions ).
> > Parikshit
> > ----- Original Message -----
> > From: Lou Bona <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 15, 2000 4:02 PM
> > Subject: Re: Threads in weblogic server
> >
> > I'm doing a very similar thing, and so far in my testing it's working
> fine.
> > I'm
> > using Weblogic 4.5, BTW.
> >
> > I've got a separate process (different VM) that is event driven. It will
> > spawn
> > threads that create a SFSB,
> > interact with the db via entity beans, then go away. The threads act as
> pure
> > clients and as such are not
> > limited by EJBs restrictions on threading, as far as I know anyway.
> >
> > good luck,
> >
> > Lou Bona
> > Chief Software Architect
> > agentGo.com
> >
> > Ajay Jain wrote:
> >
> > > 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".
>
> ==========================================================================
> =
> 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".
This e-mail, and any attachment, is confidential. If you have received it in error,
please delete it from your system, do not use or disclose the information in any way,
and notify me immediately. The contents of this message may contain personal views
which are not the views of the BBC, unless specifically stated.
===========================================================================
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".