Controlling an app server programmatically...

  • Thread starter Bogus Exception
  • Start date
B

Bogus Exception

My need is for JBoss, but the solution might not be container-
specific.

What is the method/approach to programmatically configuring a
container from an application inside that container? For example,
programmatically viewing, adding, or removing JMS topics & queues.

TIA!
 
P

Philipp Taprogge

Hi!

Thus spake Bogus Exception on 05/06/2007 10:57 PM:
What is the method/approach to programmatically configuring a
container from an application inside that container? For example,
programmatically viewing, adding, or removing JMS topics & queues.

I would probably go JMX. Write an MBean and deploy it with your
application. Then you could either use JBoss's JMX console to
manually call methods on it or get hold of the MBean programatically
via the MBeanLocator and call it's methods that way.

HTH,

Phil
 
B

Bogus Exception

Phil,

Thanks for the post! I'm trying to do just what you suggest with the
MBeans. I need to deploy instances of the MBeans as well as start and
stop topics & queues-all programmatically. In fact, I aim to do all of
that through web services, so the normal JMX web console is out.

Right now I'm struggling to find examples of how to deploy MBeans and
create JMS queues and topics. Got any leads? :)

Thanks!

Bogus Exception
 
P

Philipp Taprogge

Hi!

Thus spake Bogus Exception on 05/07/2007 05:46 AM:
In fact, I aim to do all of
that through web services, so the normal JMX web console is out.

Are you sure, the overhead webservices employ is worth it?
Depending on the application, a Client-Server app might me more
light-weight. Unfortunately, you have added very little information
about your application, so if you indeed have reason to use
webservices, disregard this remark.
Right now I'm struggling to find examples of how to deploy MBeans and
create JMS queues and topics. Got any leads? :)

IIRC there's a tutorial somewhere on the JBoss site. I have recently
implemented MBeans in an EJB3 environment and there it's just a set
of annotations on the MBean class itself. Please send me a private
mail if you need a code example for that.

HTH,

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top