perhaps i have to get more specific :)
i have a root resource A.
this resource is called whenever a client tries to access the resource. if i
instantiate a class B in the constructor of the resource A, this class will
be instantiated every time a client accesses my webapplication.
what i need is a class that is instantiated only once (when the webapp is
deployed) and runs all the time.
why:
the resources of my webapplication write into a database. now i need a
mailing service that sends emails according to the data in the database. so
i need only one instantiation of the mailing service that polls the database
all the time.
do you have any ideas, how i can achieve that? thanks in advance
--
View this message in context: http://jersey.576304.n2.nabble.com/running-a-parallel-polling-thread-when-the-webapp-gets-deployed-tp7269447p7272149.html
Sent from the Jersey mailing list archive at Nabble.com.