aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes getting time remaining of stateful ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "getting time remaining of stateful ejb" Watch "getting time remaining of stateful ejb" New topic
Author

getting time remaining of stateful ejb

Bhupesh Kokate
Greenhorn

Joined: Jul 18, 2003
Posts: 22
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

Joined: Feb 27, 2002
Posts: 8919

You will have to tell us which vendor you are using.


Groovy
Bhupesh Kokate
Greenhorn

Joined: Jul 18, 2003
Posts: 22
hmm... its on Websphere ... but how does it matter .. ?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

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

Joined: Jul 18, 2003
Posts: 22
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

Joined: Jul 18, 2003
Posts: 22
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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
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

Joined: Feb 27, 2002
Posts: 8919

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

Joined: Mar 25, 2002
Posts: 662
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

Joined: Feb 27, 2002
Posts: 8919

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

Joined: Jul 18, 2003
Posts: 22
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

Joined: Mar 25, 2002
Posts: 662
Did they give any explanation for the exception ??
Bhupesh Kokate
Greenhorn

Joined: Jul 18, 2003
Posts: 22
nope ... so far I didnt find ...
 
wood burning stoves
 
subject: getting time remaining of stateful ejb