• 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

Doubt in JMS

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Secnario:

*****************************************
* MQ --> JMS(MDB) --> Oracle DB *
*****************************************

The above is the scenario, the data will be read by MQ and MDB will do some processing, then updates the data in to the oracle.

But the restriction here is the DB might go down for 6-7 hours daily, at that time the MDB should not run ( read the message & process it).

Please help me suggesting some design for the above scenario like

1. How to deploy & Undeploy the MDB on timely basis
2. Can I have some scheduler in JMS service

Thanks in Advance
Ayyanar...
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think you can do that,As you know that we have TimerService in EJB 2.1 ownward,which can run automatically on given time period.
So you can use TimeService as background process which keep testing your data base status,if the data base is down that you can undeploy the MDB.
You need to pack your MDB as a seperate JAR file,so that when you deploy/un-deploy other component will not get effected.
And you need to explorer how you can deploy/undeploy JAR files on different conatiners.
But I can give to some start point so that you can start as far as deployment/un-deployment is concern.
If you go to your application server amin page,where you can deploy/un-deploy your EJB,just place the mouse over the link than It will show what url is being invoked.
e.g. in Tomcat if you want to stop any context than http://<host>:<port>/manager/html/stop?path=<context name> is used
and we can achive using simple java code which make connection to given url and stop the context.
So when the timer service came to know that database is down than it will undeploy your MDB and when DB is back than it will deploy the MDB.

Hope that this will help you.

Cheers,
Sunil Dixit
 
reply
    Bookmark Topic Watch Topic
  • New Topic