Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

Controlling an app server programmatically...

Thread view: 
Bogus Exception - 06 May 2007 21:57 GMT
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!
Philipp Taprogge - 07 May 2007 01:25 GMT
Hi!

> 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
Bogus Exception - 07 May 2007 04:46 GMT
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

> 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.
Philipp Taprogge - 07 May 2007 23:36 GMT
Hi!

> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.