[Mc4j-cvs] mc4j/modules/ems/src/ems-impl/org/mc4j/ems/impl/jmx/connection/support/providers Webspher
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2006-05-22 02:38:55
|
Update of /cvsroot/mc4j/mc4j/modules/ems/src/ems-impl/org/mc4j/ems/impl/jmx/connection/support/providers In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv32360/modules/ems/src/ems-impl/org/mc4j/ems/impl/jmx/connection/support/providers Modified Files: WebsphereConnectionProvider.java JBossConnectionProvider.java Log Message: Visual tweaks Index: JBossConnectionProvider.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/modules/ems/src/ems-impl/org/mc4j/ems/impl/jmx/connection/support/providers/JBossConnectionProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JBossConnectionProvider.java 12 Apr 2006 19:11:33 -0000 1.2 --- JBossConnectionProvider.java 22 May 2006 02:38:52 -0000 1.3 *************** *** 26,29 **** --- 26,30 ---- import javax.naming.InitialContext; import javax.naming.NamingException; + import javax.naming.NoInitialContextException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; *************** *** 129,134 **** props.put(Context.PROVIDER_URL, connectionSettings.getServerUrl()); ! InitialContext context = new InitialContext(props); ! return context; } --- 130,144 ---- props.put(Context.PROVIDER_URL, connectionSettings.getServerUrl()); ! try { ! InitialContext context = new InitialContext(props); ! return context; ! } catch(NoInitialContextException e) { ! // Try to be more helpful, indicating the reason we couldn't make the connection in this ! // common case of missing libraries ! if (e.getCause() instanceof ClassNotFoundException) { ! throw new ConnectionException("Necessary classes not found for remote connection, check installation path configuration.",e.getCause()); ! } ! throw e; ! } } Index: WebsphereConnectionProvider.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/modules/ems/src/ems-impl/org/mc4j/ems/impl/jmx/connection/support/providers/WebsphereConnectionProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WebsphereConnectionProvider.java 12 Apr 2006 19:11:33 -0000 1.2 --- WebsphereConnectionProvider.java 22 May 2006 02:38:52 -0000 1.3 *************** *** 143,150 **** Method createMethod = ! adminClientFactoryClass.getMethod("createAdminClient",new Class[] { Properties.class }); Object adminClient = ! createMethod.invoke(null, new Object[] { props }); this.statsProxy = new GenericMBeanServerProxy(adminClient); --- 143,150 ---- Method createMethod = ! adminClientFactoryClass.getMethod("createAdminClient", Properties.class); Object adminClient = ! createMethod.invoke(null, props); this.statsProxy = new GenericMBeanServerProxy(adminClient); *************** *** 152,156 **** //this.mejb = retrieveMEJB(ctx); - super.connect(); // TODO GH: Customize exception and error messages to help --- 152,155 ---- |