This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt with invoking a class when jboss starts

 
Hari Dhanakoti
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a task of executing some piece of code to retrieve data from the database for specified time interval. I need to execute this process when jboss is started. I had already framed the piece of code to retrieve data from the database using quartz for time scheduling.

Additionally, I would be deploying the total project as a jar file. So the class functionality has to executed when it is a class.

Some one said me that can be achieved through the MBean's.

Can any one give me suggestions for me how to proceed....
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need to execute this process when jboss is started

Use JBoss specific @Service
 
Hari Dhanakoti
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jaikiran,

But I try to implement using a plain java codes to access the database. So I cant work out with EJB 3.0

Any other possible solutions ?
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might help then. There's also a example linked to that wiki.
 
Hari Dhanakoti
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai wrote:This might help then. There's also a example linked to that wiki.


Yes Jaikiran. Thanks for your help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic