Package javax.management.j2ee

Examples of javax.management.j2ee.ManagementHome


      throws
      Exception
   {
      getLog().debug("+++ getManagementEJB()");
      Object lObject = getInitialContext().lookup("ejb/mgmt/MEJB");
      ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(
         lObject,
         ManagementHome.class
      );
      getLog().debug("Found JSR-77 Management EJB (MEJB)");
      return home.create();
   }
View Full Code Here


        try {
            Properties p = new Properties();
            p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
            InitialContext ctx = new InitialContext(p);

            ManagementHome mejbHome = (ManagementHome)ctx.lookup("ejb/mgmt/MEJBRemoteHome");
            mejb = mejbHome.create();
           
            // save credentials
            this.username = username;
            this.password = password;
            this.port = port;
View Full Code Here

   
    protected Management getMEJB(Hashtable env) throws Exception {
        String jndiName = "ejb/mgmt/MEJB";
        InitialContext ctx = new InitialContext(env);
        Object objref = ctx.lookup(jndiName);
        ManagementHome home = (ManagementHome)
            PortableRemoteObject.narrow(objref,ManagementHome.class);
        Management mejb = home.create();
        return mejb;
    }
View Full Code Here

        try {
            Properties p = new Properties();
            p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
            InitialContext ctx = new InitialContext(p);

            ManagementHome mejbHome = (ManagementHome)ctx.lookup("ejb/mgmt/MEJB");
            mejb = mejbHome.create();
           
            // save credentials
            this.username = username;
            this.password = password;
            this.port = port;
View Full Code Here

   
    protected Management getMEJB(Hashtable env) throws Exception {
        String jndiName = "ejb/mgmt/MEJBRemoteHome"; // should be "ejb/mgmt/MEJB"
        InitialContext ctx = new InitialContext(env);
        Object objref = ctx.lookup(jndiName);
        ManagementHome home = (ManagementHome)
            PortableRemoteObject.narrow(objref,ManagementHome.class);
        Management mejb = home.create();
        return mejb;
    }
View Full Code Here

      throws
      Exception
   {
      getLog().debug("+++ getManagementEJB()");
      Object lObject = getInitialContext().lookup("ejb/mgmt/MEJB");
      ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(
         lObject,
         ManagementHome.class
      );
      getLog().debug("Found JSR-77 Management EJB (MEJB)");
      return home.create();
   }
View Full Code Here

        Management mejb = null;
        try {
            final Context ic = new InitialContext();
            final String ejbName = System.getProperty("mejb.name", "ejb/mgmt/MEJB");
            final Object objref = ic.lookup(ejbName);
            final ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(objref, ManagementHome.class);
            mejb = home.create();
        } catch (Exception ex) {
            throw new RuntimeException("Can't find MEJB", ex);
        }
        return mejb;
    }
View Full Code Here

        if (mMEJB == null) {
            try {
                final Context ic = new InitialContext();
                final String ejbName = System.getProperty( MEJB_NAME_PROP, MEJB_DEFAULT_NAME);
                final Object objref = ic.lookup(ejbName);
                final ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(objref, ManagementHome.class);
                mMEJB = (Management) home.create();
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
        return mMEJB;
View Full Code Here

            env.put(Context.INITIAL_CONTEXT_FACTORY, connectionSettings.getInitialContextName());

            Context oc4jctx = new InitialContext(env);

            Object obj = (ManagementHome) oc4jctx.lookup(connectionSettings.getJndiName());
            ManagementHome mgmtHome = (ManagementHome) PortableRemoteObject.narrow(obj, ManagementHome.class);
            Management oc4jmbs = mgmtHome.create();
            GenericMBeanServerProxy proxy = new GenericMBeanServerProxy(getMBeanServer());
            setStatsProxy(proxy);
            this.mbeanServer = proxy.buildServerProxy();

            this.mejb = oc4jmbs;
View Full Code Here

        try {
            Properties p = new Properties();
            p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
            InitialContext ctx = new InitialContext(p);

            ManagementHome mejbHome = (ManagementHome)ctx.lookup("ejb/mgmt/MEJB");
            mejb = mejbHome.create();
           
            // save credentials
            this.username = username;
            this.password = password;
            this.port = port;
View Full Code Here

TOP

Related Classes of javax.management.j2ee.ManagementHome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.