> MBeanServer server = MBeanServerFactory.findMBeanServer(null).get(0);
thanx a lot! the line above what was i was missing...how to get teh default
MBean server running in JBoss.( i should read more the JMX APIs :-(
will it be so that, after my app has started, if i look at jmx-console i'll see
my MBean?
thanx and regards
marco
> server.registerMBean(cfg, cfg.OBJECT_NAME);
> server.invoke(
> ServiceController.OBJECTNAME,
> "start",
> new Object[] {cfg.OBJECT_NAME},
> new String[] { ObjectName.class.getName() });
>
> destroy():
>
> MBeanServer server =3D
> MBeanServerFactory.findMBeanServer(null).get(0);
> server.invoke(
> ServiceController.OBJECTNAME,
> "destroy",
> new Object[] {cfg.OBJECT_NAME},
> new String[] { ObjectName.class.getName() });
> server.unregisterMBean(cfg.OBJECT_NAME);
>
>
>
>
> MMnc> there is some piece (of code?) that i am missing:
> either how to creat=
> e an MBean and register it
> MMnc> with the default server or how to deploy it with a sar
> file and initi=
> alize in my app...
>
> MMnc> which is simpler? anyway, i don't know how to do both...
>
> MMnc> do u have any suggestions?
>
> MMnc> thanx in advance and regards
> MMnc> marco
>
>
>
>
> >>=20
> >>=20
> >>=20
> >>=20
> >> On 2003.03.17 07:10 [EMAIL PROTECTED] wrote:
> >> > hi all,
> >> > i am little novice with JBoss JMX and i wanted to ask
> >> > few questions.
> >> >=20
> >> > I have written my own Custom MBean to monitor properties=20
> >> loaded in the
> >> > servlet of my web application.
> >> > i have written a .sar file which contains .class files as well as
> >> > jboss-service.xml.
> >> >=20
> >> > Now, in the constructor of my MBean, i should pass some=20
> >> initialization
> >> > parameters (the properties
> >> > loaded in the servlet); so, i have to add an entry to my
> >> > jboss-service.xml.
> >> > Not only, but those properties should be the ones loaded in=20
> >> my servlet.
> >> > So this looks like my MBean
> >> > should not be created until my webapp is started (in the=20
> >> init() method of
> >> > hte servlet i have to create
> >> > the MBean by passing properties loaded in my servlet).
> >> >=20
> >> > But, i m little lost...since i don't even know the DTD of
> >> > jboss-service.xml.
> >> >=20
> >> > Can anyone of you help me in sorting out what i have to do=20
> >> so that i can
> >> > monitor
> >> > my servlet thru my Custom MBean?
> >> >=20
> >> > to me it looks like i have to:
> >> > - add an entry in jboss-service.xml to specify the initialization
> >> > parameters of t he constructor
> >> > - add an entry so that my MBean is NOT created until my
> servlet is
> >> > started
> >> > - then?
> >> >=20
> >> > thanx in advance and regards
> >> > marco
> >> >=20
> >> >=20
> >> >=20
> >> >=20
> >> >=20
> >> > > -----Original Message-----
> >> > > From: Mistroni Marco (NET-IMN/Espoo)=20
> >> > > Sent: 17 March, 2003 13:56
> >> > > To: '[EMAIL PROTECTED]'
> >> > > Subject: jboss-service.xml DTD
> >> > >=20
> >> > >=20
> >> > > hi all,
> >> > > anyone can point me to where i can find the DTD for=20
> >> > > jboss-service.xml?
> >> > >=20
> >> > > i have to specify a constructor for an MBean that accepts=20
> >> > > input parameters and
> >> > > i don't know how to do it....
> >> > >=20
> >> > > can anyone help me?
> >> > >=20
> >> > > thanx and regards
> >> > > marco
> >> > >=20
> >> > >=20
> >> > >=20
> >> > > > -----Original Message-----
> >> > > > From: ext Kevin Conner=20
> >> [mailto:[EMAIL PROTECTED]
> >> > > > Sent: 17 March, 2003 11:55
> >> > > > To: '[EMAIL PROTECTED]'
> >> > > > Subject: RE: [JBoss-user] Axis & JBoss - Client Stubs=20
> >> Not Portable ?
> >> > > >=20
> >> > > >=20
> >> > > > Hiya Nicholas.
> >> > > >=20
> >> > > > > I have been working with Axis & JBoss for a while and
> >> > > > > I am finally getting around to putting together my
> >> > > > > build system. It has occured to me that when I run
> >> > > > > WSDL2Java, the client stubs generated have HARD CODED
> >> > > > > IP addresses or host names, making the generated code=20
> >> completely
> >> > > > > non-portable to other systems. So much for code
> once, run=20
> >> > > > > anywhere. The
> >> > > > > components affected are the ServiceLocator and the=20
> >> > > > SoapBindingStubs.=20
> >> > > >=20
> >> > > > I think the only one which makes it unportable is using=20
> >> the default
> >> > > > method in the locator to create a stub as this is used to=20
> >> > > communicate
> >> > > > with the server. The url used is the endpoint url
> or, if not=20
> >> > > > supplied,
> >> > > > then the location generating the wsdl.
> >> > > >=20
> >> > > > The only ones I can think of in the stub are the type=20
> >> and operation
> >> > > > namespaces, neither of which really have any
> functional bearing
> >> > > > (they just partition the types and operations).
> >> > > >=20
> >> > > > > The ServiceLocator issue seems to be trivial to fix,
> >> > > > > but the SoapBindingStubs use the IP address/host name
> >> > > > > in the namespaces.
> >> > > >=20
> >> > > > Use the methods with a URL parameter to provide the=20
> >> location of the
> >> > > > service. If you don't like the generated one then you=20
> >> can override
> >> > > > it using the endpointURL element within service (in
> the wsdd).
> >> > > >=20
> >> > > > The type and operations are affected by a number of=20
> >> things but the
> >> > > > best one is probably the default namespace. This can also be
> >> > > > specified in the wsdd file using the namespace elements=20
> >> in service.
> >> > > > (The first namespace is the default one).
> >> > > >=20
> >> > > > > Am I doing something wrong here ? Does anyone have any
> >> > > > > insight into this ?
> >> > > >=20
> >> > > > Let me know how you get on.
> >> > > >=20
> >> > > > Kev
> >> > > >=20
> >> > > > Kevin Conner
> >> > > > This is a personal e-mail. Any views or opinions
> presented are=20
> >> > > > solely those of the author and do not necessarily=20
> >> represent those=20
> >> > > > of Orchard Information Systems Ltd.
> >> > > >=20
> >> > > >=20
> >> > > > -------------------------------------------------------
> >> > > > This SF.net email is sponsored by:Crypto Challenge
> is now open!=20
> >> > > > Get cracking and register here for some mind
> boggling fun and=20
> >> > > > the chance of winning an Apple iPod:
> >> > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> >> > > > _______________________________________________
> >> > > > JBoss-user mailing list
> >> > > > [EMAIL PROTECTED]
> >> > > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >> > > >=20
> >> > >=20
> >> >=20
> >> >=20
> >> > -------------------------------------------------------
> >> > This SF.net email is sponsored by:Crypto Challenge is
> now open!=20
> >> > Get cracking and register here for some mind boggling fun and=20
> >> > the chance of winning an Apple iPod:
> >> > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> >> > _______________________________________________
> >> > JBoss-user mailing list
> >> > [EMAIL PROTECTED]
> >> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >> >=20
> >> >=20
> >>=20
> >>=20
> >> -------------------------------------------------------
> >> This SF.net email is sponsored by:Crypto Challenge is now open!=20
> >> Get cracking and register here for some mind boggling fun and=20
> >> the chance of winning an Apple iPod:
> >> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> >> _______________________________________________
> >> JBoss-user mailing list
> >> [EMAIL PROTECTED]
> >> https://lists.sourceforge.net/lists/listinfo/jboss-user
> >>=20
>
>
> MMnc> -------------------------------------------------------
> MMnc> This SF.net email is sponsored by:Crypto Challenge is now open!
> MMnc> Get cracking and register here for some mind boggling fun and
> MMnc> the chance of winning an Apple iPod:
> MMnc> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> MMnc> _______________________________________________
> MMnc> JBoss-user mailing list
> MMnc> [EMAIL PROTECTED]
> MMnc> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
> --=20
> Best regards,
> julien mailto:[EMAIL PROTECTED]
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran=E7ais !
> Yahoo! Mail : http://fr.mail.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open!=20
> Get cracking and register here for some mind boggling fun and=20
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user