• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Using JMX for mail checking and doing an action

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My requirement is that i need to monitor a mail id from a j2ee application and if any new mail comes, then i need to perform some action.

i am using the Jboss application server. For monitoring the mailid, i am looking forward to use JMX, but not sure that these functionalities could be performed using JMX.

please guide me.
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i am using the Jboss application server. For monitoring the mailid, i am looking forward to use JMX, but not sure that these functionalities could be performed using JMX.



JMX is not the issue. Of course, JMX can monitor, and triggering actions. It is just a container that runs MBeans.

The issue is does JBoss provide a mail monitoring MBean? That does what you want? To do that you need to check out the JBoss documentation -- and of course, also figure out how to do it.


BTW, the last time that I checked, JBoss had an incredible amount of MBeans running in the MBean server. Around 300, if I had to estimate. The hard part may be to sort through that pile, to find the one MBean that does what you want.

Henry
[ December 29, 2006: Message edited by: Henry Wong ]
 
abhi gupta
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So apart from using the JMX, do we have any other way of doing this.

Can we have some scheduler, which would periodically check the particular mail id. If any new mail has come then it would analyze its contents and take corresponding actions?
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can of course create your own MBean and install that with your earfile to monitor whatever you want to monitor.

A more traditional approach to this would be to have a servlet with load-on-startup set to 1 which in its init launches a thread with a timed action to do what you want it to do.
It could have a public interface people can call to check on its status, and might take actions of its own if needed as well.
 
abhi gupta
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot Jeroen and Henry. i will try some of the options listed by you and get back if i face problem in them.

thanks again!!
 
machines help you to do more, but experience less. Experience this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic