Package javax.management.j2ee

Examples of javax.management.j2ee.ManagementHome.create()


      ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(
         lObject,
         ManagementHome.class
      );
      getLog().debug("Found JSR-77 Management EJB (MEJB)");
      return home.create();
   }

   private ObjectName getConnectionFactoryName(Management jsr77MEJB) throws Exception
   {
      String domainName = jsr77MEJB.getDefaultDomain();
View Full Code Here


            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

        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;
    }
   
    protected String getRealmName() {
        return "geronimo-admin";
View Full Code Here

            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

        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;
    }
   
    protected String getRealmName() {
        return "geronimo-admin";
View Full Code Here

        try {
            Context ic = new InitialContext();
            String ejbName = System.getProperty("mejb.name","ejb/mgmt/MEJB");
            java.lang.Object objref = ic.lookup(ejbName);
            ManagementHome home = (ManagementHome)PortableRemoteObject.narrow(objref, ManagementHome.class);
            mejb = home.create();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return mejb;
    }
View Full Code Here

        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

            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

            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

            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
Copyright © 2018 www.massapi.com. 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.