On 05/04/2016 18:30, Mariano López wrote:
> Hi all, I'm working with Tomcat 8.0.32 after migrating from 7.0.X.
>
> When I want to get the host object in Tomcat 7 I did:
>
> MBeanServer mBeanServer =
> MBeanServerFactory.findMBeanServer(null).get(0);
> ObjectName catalinaNombre = null;
> try {
> catalinaNombre = new ObjectName("Catalina","type","Server");
> servidorTomcat = (Server) mBeanServer.getAttribute(
> catalinaNombre, "managedResource");
> StandardEngine engineTomcat = (StandardEngine)
> servidorTomcat.findService("Catalina").getContainer();
> hostTomcat = (Host) engineTomcat.findChild( "localhost" );
> }
> ...
>
> Now findService("Catalina").getContainer() is deprecated and don't know how
> to do it.
>
> Nothing found after long search about this.
>
> Could anybody help me please ?
You don't need to change anything. Look at the Javadocs for an
explanation of the deprecation.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]