I would like to do this.
Separate application(Engine) written in java which listens to Broadcast
messages(Stock Values).
This Engine will have the alert information(i.e alert me when "Dell's" stock
raises to 10 or X something like that)
set by the user in Memory(Hash,Array,Vector etc...).
It will check the information on memory with the message its listening from
Tibco. When the Alert information matches with the Broadcasted messages,
this engine needs to alert the User by sending email.
This is what the Functionality of the Engine. Now using the Portal, if the
user wants to Edit the Alert information(i.e instead of alerting him at 10
he wants to get alert when it reaches 15) or a new alert information is
set(May be for someother Stock value), the alert information which has been
stored in Memory needs to get updated. That is the 15 and new stock alert
information needs to be updated in the memory.
This is what my requirement is. Tell me how can we achieve this.
-----Original Message-----
From: Christopher K. St. John [mailto:[EMAIL PROTECTED]]
Sent: 28 March, 2001 11:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Servlet needs to run till the lifetime ofWebserver
Ganesh MohanRao wrote:
>
> There needs to be a Engine or Daemon "UP and Running" always to make sure
> that it checks the user alert settings as well as listening the the
messages
> broadcasted from the Tibco.
>
Are you saying that you'd like to:
a) run the message listener engine/daemon inside the servlet
container as a thread started by a servlet? (or, if you're
using JMS, connect and register listeners in a servlet's
init()?)
b) run a separate application that listens to the broadcasts,
then turns them into http calls over to your servlet to
tell it to update its information.
c) do something else?
Although (b) is harder to deploy, it might be easier in the
long run than (a), since starting threads in servlets is
potentially problematic[1]
If you're using a J2EE server, MessageDrivenBeans are just
exactly what you want. Well, they will be what you want.
They're being introduced in 1.3 and might be something to
consider for the future...
[1] <URL:http://www.distributopia.com/servlet_stuff/background_threads.txt>
Mini-faq on some of the problems you might hit trying to manage
threads started from your servlet. (See the second Q/A) If you're
using JMS, replace "start/stop thread" with "start/stop JMS
connection"
--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets