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