ObjectName oname = ObjectName.getInstance("", name, String.valueOf(count));
String domain=obj.getClass().getPackage().getName(); ObjectName oname = ObjectName.getInstance(domain+":type="+name+",id="+count);
    private synchronized void addBean(Object obj)    {        try        {            if (obj == null || _beans.containsKey(obj))                return;                        Object mbean = ObjectMBean.mbeanFor(obj);            if (mbean == null)                return;            if (mbean instanceof ObjectMBean)                ((ObjectMBean) mbean).setMBeanContainer(this);                        String name = obj.getClass().getName().toLowerCase();            int dot = name.lastIndexOf('.');            if (dot >= 0)                name = name.substring(dot + 1);            Integer count = (Integer) _unique.get(name);            count = TypeUtil.newInteger(count == null ? 0 : (1 + count.intValue()));            _unique.put(name, count);            ObjectName oname = ObjectName.getInstance("", name, String.valueOf(count));                        ObjectInstance oinstance = _server.registerMBean(mbean, oname);            Log.debug("Registered {}" , oinstance.getObjectName());            Bean bean=new Bean(oinstance.getObjectName());            _beans.put(obj, bean);        }        catch (Exception e)        {            Log.warn("bean: "+obj,e);        }    }