On 2002.08.30 02:20:49 -0400 Michael Klem wrote:
> Two questions:
> 
> 1. Would this work for 2.4.4?

no, definitely not.
> 
> 2. I am currently using ModelMBeans for all of my management and they 
> only get created when the managed resources are used. Therefore I 
> don't know if the sar file would work for me. Should I be creating my 
> MBeans at startup? Can I using ModelMBeans? I don't see how since the 
> objects being managed are Java objects and not ejbs.

In jboss 3++ you can deploy/undeploy mbeans in packages by putting their
xml configuration in a *-service.xml file and deploying/undeploying this
file (or a .sar file containing it).  For instance, the base jboss server
config is in .../conf/jboss-service.xml, containing most of what was in
jboss.jcml in 2.4.x.

If you create an mbean in code, you are responsible for unregistering it
when you are done with it.

Most of the mbeans in jboss are standard or dynamic and can be deployed by
a config in the xml file without any extra info.  You can also deploy
xmbeans in 3.0.x by including a reference to their xml descriptor.  In
jboss 4 (cvs head) you can deploy xmbeans by including the xml descriptor,
including initial attribute values, inline in the xml config.

xmbeans are a kind of modelmbean where the descriptor contents come from an
xml file.  Juha's book describes them a little bit.  Right now they are the
only kind of modelmbean I know how to deploy using the *-service.xml
framework.

In xdoclet cvs (soon to be 1.2) there's an xmbean task that lets you
generate the xml xmbean descriptor from your marked up class.

Therefore, you may be able to replace whatever you are using to create the
model mbeans with:

--xdoclet generates xmbean descriptors from your marked up code.
--as part of the "human deployment" process you write a myapp-service.xml
file with the configurations for the mbeans you will need, with references
to the  xmbean descriptors and attribute values as needed.
--you include this *-service.xml file in an appropriate part of your app
packaging so the mbeans are deployed along with the rest of your app and
undeployed when your app is undeployed.

thanks
david jencks

> 
> Thanks
> 
> >I have my MBean in a .sar inside a .jar and it
> >gets deregistered when I redeploy.  Actually we
> >have the .sar in a .jar inside and .ear now and
> >it still gets deregistered on redeploy.
> >
> >JD
> >
> >-----Original Message-----
> >From: Michael Klem 
> >[<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, August 29, 2002 4:35 PM
> >To: [EMAIL PROTECTED]
> >Subject: [JBoss-user] JMX question
> >
> >
> >What is the correct process to unregister all my MBeans when I
> >redeploy my application code?
> >
> >Currently, if there are any of my app specific MBeans registered and
> >I redploy the software, I get the following error:
> >
> >javax.management.InstanceAlreadyExistsException
> >
> >
> >Is there a way to unregister my MBeans when the app gets redployed?
> >The only way to get around this for now is to stop, redeploy and
> >restart the server.
> >--
> >"If I beat Mr. Burns--I mean really wallop him good I'm sure to get
> >that big promotion I've been gunning for!" - Homer
> >
> >
> >-------------------------------------------------------
> >This sf.net email is sponsored by:ThinkGeek
> >Welcome to geek heaven.
> ><http://thinkgeek.com/sf>http://thinkgeek.com/sf
> >_______________________________________________
> >JBoss-user mailing list
> >[EMAIL PROTECTED]
> 
>><https://lists.sourceforge.net/lists/listinfo/jboss-user>https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> -- 
> "If I beat Mr. Burns--I mean really wallop him good I'm sure to get 
> that big promotion I've been gunning for!" - Homer
> <!doctype html public "-//W3C//DTD W3 HTML//EN">
> <html><head><style type="text/css"><!--
> blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
>  --></style><title>RE: [JBoss-user] JMX question</title></head><body>
> <div>Two questions:</div>
> <div><br></div>
> <div>1. Would this work for 2.4.4?</div>
> <div><br></div>
> <div>2. I am currently using ModelMBeans for all of my management and
> they only get created when the managed resources are used. Therefore I
> don't know if the sar file would work for me. Should I be creating my
> MBeans at startup? Can I using ModelMBeans? I don't see how since the
> objects being managed are Java objects and not ejbs.</div>
> <div><br></div>
> <div>Thanks</div>
> <div><br></div>
> <blockquote type="cite" cite><font size="-1">I have my MBean in a .sar
> inside a .jar and it</font><br>
> <font size="-1">gets deregistered when I redeploy.&nbsp; Actually
> we</font><br>
> <font size="-1">have the .sar in a .jar inside and .ear now
> and</font><br>
> <font size="-1">it still gets deregistered on redeploy.</font><br>
> </blockquote>
> <blockquote type="cite" cite><font size="-1">JD</font><br>
> </blockquote>
> <blockquote type="cite" cite><font size="-1">-----Original
> Message-----</font><br>
> <font size="-1">From: Michael Klem [</font><a
> href="mailto:[EMAIL PROTECTED]";><font
> size="-1">mailto:[EMAIL PROTECTED]</font></a><font
> size="-1">]</font><br>
> <font size="-1">Sent: Thursday, August 29, 2002 4:35 PM</font><br>
> <font size="-1">To: [EMAIL PROTECTED]</font><br>
> <font size="-1">Subject: [JBoss-user] JMX question</font><br>
> </blockquote>
> <blockquote type="cite" cite><br></blockquote>
> <blockquote type="cite" cite><font size="-1">What is the correct
> process to unregister all my MBeans when I</font><br>
> <font size="-1">redeploy my application code?</font><br>
> </blockquote>
> <blockquote type="cite" cite><font size="-1">Currently, if there are
> any of my app specific MBeans registered and</font><br>
> <font size="-1">I redploy the software, I get the following
> error:</font><br>
> </blockquote>
> <blockquote type="cite" cite><font
> size="-1">javax.management.InstanceAlreadyExistsException</font><br>
> </blockquote>
> <blockquote type="cite" cite><br></blockquote>
> <blockquote type="cite" cite><font size="-1">Is there a way to
> unregister my MBeans when the app gets redployed?</font><br>
> <font size="-1">The only way to get around this for now is to stop,
> redeploy and</font><br>
> <font size="-1">restart the server.</font><br>
> <font size="-1">--</font><br>
> <font size="-1">&quot;If I beat Mr. Burns--I mean really wallop him
> good I'm sure to get</font><br>
> <font size="-1">that big promotion I've been gunning for!&quot; -
> Homer</font><br>
> </blockquote>
> <blockquote type="cite" cite><br></blockquote>
> <blockquote type="cite" cite><font
> size="-1">-------------------------------------------------------</font
> ><br>
> <font size="-1">This sf.net email is sponsored by:ThinkGeek</font><br>
> <font size="-1">Welcome to geek heaven.</font><br>
> <a href="http://thinkgeek.com/sf";><font
> size="-1">http://thinkgeek.com/sf</font></a><br>
> <font
> size="-1">_______________________________________________</font><br>
> <font size="-1">JBoss-user mailing list</font><br>
> <font size="-1">[EMAIL PROTECTED]</font><br>
> <a
> href="https://lists.sourceforge.net/lists/listinfo/jboss-user";><font
> size="-1">https://lists.sourceforge.net/lists/listinfo/jboss-user</font
> ></a></blockquote>
> <div><br></div>
> <div><br></div>
> <x-sigsep><pre>-- 
> </pre></x-sigsep>
> <div>&quot;If I beat Mr. Burns--I mean really wallop him good I'm sure
> to get that big promotion I've been gunning for!&quot; - Homer</div>
> </body>
> </html>


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to