aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How a timer is persisted, when an EJB container crashes? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How a timer is persisted, when an EJB container crashes?" Watch "How a timer is persisted, when an EJB container crashes?" New topic
Author

How a timer is persisted, when an EJB container crashes?

Akshay Kumar
Ranch Hand

Joined: Feb 24, 2004
Posts: 37
hi,

i read in ejb timer tutorials that container persists the running timers and making it to resume its operation once the EJB container is up. so, how does this persistence happens? where does the details of timer gets stored and retrieved back? need some comments on this at programming-level. any effort towards this wuld b appreciated.

thanks.
James Carman
Ranch Hand

Joined: Feb 20, 2001
Posts: 580
That would be up to the vendor's discretion. Why do you care where/how the timers are stored? You should just care that it is. That's why we use EJBs, so we don't have to worry about all of the value-add services the container provides! :-)


James Carman, President<br />Carman Consulting, Inc.
Akshay Kumar
Ranch Hand

Joined: Feb 24, 2004
Posts: 37
i have to look into it. why because i'm running a timer which i need to restart it manually after a certain period of suspension. helplessly, the API doesn't support here by providing methods like suspend() and resume(), which could be controlled by programmers.

well, after a considerable amount of effort, i found those db operations from "C:\jboss-4.0.0\server\default\data\hypersonic\localDB.script". clearly, the problem now persists is at the execution of a tool for creating sample tables, in-memory using the command
"java org.hsqldb.util.DatabaseManagerSwing". it opens up with a swing GUI and with the default values in it when i click OK, it throws..........

Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: java/sql/Savepoint
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hsqldb.util.ConnectionDialogSwing.createConnection(Unknown Source)
at org.hsqldb.util.ConnectionDialogSwing.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How a timer is persisted, when an EJB container crashes?