• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting time remaining of stateful ejb

 
Bhupesh Kokate
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have stateful ejbs, for which i have timeout set as 2 hours in its vendor specific descriptor file. In the middle of code somewhere, I want to check how much time remaining for my ejbs to get timeout. How do I get that?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to tell us which vendor you are using.
 
Bhupesh Kokate
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm... its on Websphere ... but how does it matter .. ?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because it is a vendor specific feature.
BTW, why do you want to hide the vendor?
Have you checked the Websphere API doc?
Originally posted by Bhupesh Kokate:
hmm... its on Websphere ... but how does it matter .. ?

[ September 16, 2003: Message edited by: Pradeep Bhat ]
 
Bhupesh Kokate
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because it is a vendor specific feature.
- is it ?? you mean some vendors doesnt give facility to provide timeout to ejbs ?

BTW, why do you want to hide the vendor?
- I thought its nothing do with vendor ... I was thinking some method may be of context will provide me this info in my program. I may be wrong...
Have you checked the Websphere API doc?
- i will recheck ... I might have missed it ...
Thanks
Bhupesh
 
Bhupesh Kokate
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked the Websphere API doc?

pradeep, I have checked websphere api docs. I didnt see anything fruitful regarding ejb timeout. I might have missed again.
Also, I think its something ejb spcification should talk about. Let me know what u feel ...
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If WebSphere doesn't provide a proprietary API for querying an EJB's "time-to-live", there is no other way because it's not in the specification.
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
J2EE 1.4 tutorial from Sun has a topic on TimerService of EJB2.1. It talks about creating timers, getting timer information, etc. Hope that helps.
Look at chapter 17 of the following pdf doc -
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/J2EETutorial.pdf
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
J2EE 1.4 tutorial from Sun has a topic on TimerService of EJB2.1. It talks about creating timers, getting timer information, etc. Hope that helps.

That is entriely different thing, it is about scheduling persisitent tasks.
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It talks about timeouts for EJBs and hence thought it to be relevant. Didn't get enough time to look into the details though.
[ September 17, 2003: Message edited by: Jayadev Pulaparty ]
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problems!
Originally posted by Jayadev Pulaparty:
I talks about timeouts for EJBs and hence thought it to be relevant. Didn't get enough time to look into the details though.

 
Bhupesh Kokate
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jayadev,
Stuff you suggested was useful ... but alas!!!
"The timer service of the EJB container enables you to schedule timed notifications for all types of enterprise beans except for stateful session beans"
Bhupesh
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did they give any explanation for the exception ??
 
Bhupesh Kokate
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nope ... so far I didnt find ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic