We'll, as Juha pointed out, there is nothing in the JMX spec either way
regarding JNDI. The only reference to JNDI is in chapter 1 of
the spec:

"Benefits of the JMX Architecture
...
* Leverages existing standard Java technologies

Whenever needed, the JMX specification will reference existing Java
specifications

such as Java Naming and Directory InterfaceT (JNDI), Java Database
Connectivity

API (JDBCT), Java Transaction Services (JTS), or others."

However, how JMX leverages JNDI is never specified. There is nothing wrong
with Castor exposing its MBean via JNDI, and although JBoss does make
extensive
use of JNDI, we do not expose our standard MBean interfaces via JNDI.

So, yes, access the MBeanServer as you indicate if your in the VM, or using
a
remote connector if your outside of the VM.

----- Original Message -----
From: "Frederick N. Brier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 17, 2001 5:10 PM
Subject: Re: [JBoss-user] JNDI name for J2eeDeployer?


> So what you guys are saying is I should do this:
>
> MBeanServer server = (MBeanServer)
> MBeanServerFactory.findMBeanServer(null).iterator().next();
> J2eeDeployer deployer = (J2eeDeployer)server.getObjectInstance(
> "service=J2eeDeployer" );
>
> Sorry about my misconception.  I had based my understanding of JMX from
> looking at the Castor MBean CastorJDOImpl.java which on line 95 says:
>
>          bind(new InitialContext(), "java:/" + _jndiName, this);
>
> So, I didn't even look for an alternate directory mechanism as I thought
> JBoss was built on JMX which was built on JNDI which I thought JBoss used
> exclusively.  I hadn't bothered to read the JMX specification and only
> skimmed the tutorials.  Now I have done some additional research and have
> discovered the factory and server classes <sigh>.  Why does the Castor
> MBean use JNDI.  Do servlets not have access to the MBeanServerFactory
> static methods due to some class loader design decision?  Thank you.
>
> Fred.
>
> At 01:58 PM 9/17/2001, you wrote:
> >Find it as an mbean, I don't think it is or should be in jndi.  You can
see
> >how to do this from a client (from a server is almost the same, but
> >simpler) in the (rabbithole) testsuite/..../test/JBossTestServices.java
> >file.  If you are doing this from a client, the Connector class may be in
a
> >different package in pre-rh jboss, but it does about the same stuff.
> >
> >david jencks
> >
> >On 2001.09.17 12:21:16 -0400 Frederick N. Brier wrote:
> > > What is the JNDI name for the J2eeDeployer?  I want to do:
> > >
> > > String deployerName = ???
> > >
> > > J2eeDeployer deployer = (J2eeDeployer)new InitialContext().lookup(
> > > deployerName );
> > >
> > > What is deployerName supposed to be?  In the JMX HTTP interface it is
> > > listed under the J2EE heading with a hyper link of
> > > "service=J2eeDeployer".  I haven't figured out the correlation between
> > > the
> > > web interface and the actual JNDI lookup names.  What is the
> > > correlation?  Thank you.
> > >
> > >
> > >
> > > Frederick N. Brier
> > > Sr. Software Engineer
> > > Multideck Corporation
> > >
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > >
> > >
> >
> >_______________________________________________
> >JBoss-user mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to