HashMap<String, String[]> environment = new 
HashMap<String,
                          String[]>(); String username = "karaf"; String 
password = "karaf"; 
                          String[] credentials = new String[] { username, 
password };
                          environment.put("jmx.remote.credentials", 
credentials); 
                          JMXServiceURL url =new
JMXServiceURL("service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root");
                          JMXConnector jmxc = JMXConnectorFactory.connect(url, 
environment);
                          MBeanServerConnection mbsc = 
jmxc.getMBeanServerConnection();
                          ObjectName feature = null;
                          TabularData features = null; 
                          try 
                          { 
                          
                                feature = new 
ObjectName("org.apache.karaf:type=feature,name=root");
                                
                                featuresServiceMBeanProxy = 
JMX.newMBeanProxy(mbsc,
feature,FeaturesServiceMBean.class, true); 
                                context.registerService( JMXKarafFeature.class, 
new
JMXKarafFeatureImpl(), null );
                        
featuresServiceMBeanProxy.installFeature("spring-3.0.4/3.0.4.RELEASE");//
here karaf console goes unresponsive
                          } 




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Reply via email to