• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Timer in WL 6.1

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
We use a WL6.1 and we need a way to repeat a task every n seconds, basically a timer.
What I understood from the documentation is that in WL6.1 the time services are deprecated, and the recommended way is to use 3rd party tools or the java Timer impl (which sux as it's single threaded)
We probably going to use the time services that wl provide even though it's deprecated unless someone here will enlighten me and give me some more options (or maybe point any mistakes in my understanding.)
Cheers
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JMX Timer is definitely the way to go in this case. Check out the JMX Specification and APIfor details on the Timer class and also check WebLogic's Programming WebLogic JMX Services.
JMX is very easy to program with once you get over the initial learning curve. As far as books go I recommend getting a copy of JMX in Action, ISBN: 1930110561.
I have used both WebLogic Timer Services and JMX Timer Mbeans. JMX is the much better solution of the two. It is easier to work with and based on standards.
 
Shimi Avizmil
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.
Yes but u see, I think the impl classes in 6.1 for the timer are single threaded, thus they are not very efficient and I don't think we can use them.
And I'm not sure that WL provides with an impl class in 6.1 ( I know it does with WL7.0).
Any idea?
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WebLogic 6.1 has a complete implementation of the JMX 1.0 specification. This includes the JMX Timer Service beans.
I have used JMX Timers on WLS 6.1, so I know they work.
[ December 01, 2002: Message edited by: Chris Mathews ]
 
Shimi Avizmil
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How am I supposed to do it within J2EE? The JMX timer will notify all the listeners with the same thread, right?
I know I can do it with a J2EE client app which basically take care of the timing and threading but before I go and do that I'd like to make sure u can't do it within j2ee...
Thanks again
Shimi
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic