Examples of ManagementHome


Examples of javax.management.j2ee.ManagementHome

        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

Examples of javax.management.j2ee.ManagementHome

            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

Examples of javax.management.j2ee.ManagementHome

   
    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

Examples of javax.management.j2ee.ManagementHome

     }

    public void testMEJBLookup() throws Exception {
        InitialContext initialContext = new InitialContext();
        Object o = initialContext.lookup("java:comp/env/ejb/mgmt/MEJB");
        ManagementHome home = (ManagementHome)o;
        Management mejb = home.create();
        mejb.getMBeanCount();
    }
View Full Code Here

Examples of org.jboss.example.jms.common.bean.ManagementHome

     
      try
      {
         InitialContext ic = new InitialContext();
        
         ManagementHome home = (ManagementHome)ic.lookup("ejb/Management");
         Management bean = home.create();
         bean.killAS();
      }
      catch(Exception e)
      {
         // OK, I expect exceptions following a VM kill
View Full Code Here

Examples of org.jboss.example.jms.common.bean.ManagementHome

     
      try
      {
         InitialContext ic = new InitialContext();
        
         ManagementHome home = (ManagementHome)ic.lookup("ejb/Management");
         Management bean = home.create();
         try
         {
            bean.killAS();
         }
         catch(Exception e)
View Full Code Here

Examples of org.jboss.example.jms.common.bean.ManagementHome

     
      try
      {
         InitialContext ic = new InitialContext();
        
         ManagementHome home = (ManagementHome)ic.lookup("ejb/Management");
         Management bean = home.create();
         try
         {
            bean.killAS();
         }
         catch(Exception e)
View Full Code Here

Examples of org.jboss.example.jms.common.bean.ManagementHome

     
      try
      {
         InitialContext ic = new InitialContext();
        
         ManagementHome home = (ManagementHome)ic.lookup("ejb/Management");
         Management bean = home.create();
         try
         {
            bean.killAS();
         }
         catch(Exception e)
View Full Code Here

Examples of org.jboss.example.jms.common.bean.ManagementHome

     
      try
      {
         InitialContext ic = new InitialContext();
        
         ManagementHome home = (ManagementHome)ic.lookup("ejb/Management");
         Management bean = home.create();
         try
         {
            bean.killAS();
         }
         catch(Exception e)
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.