[Mc4j-cvs] mc4j/src/org/mc4j/console/connection/wizard ConnectionIterator.java,1.8,1.9 ConnectionVis
Brought to you by:
ghinkl
From: Greg H. <gh...@us...> - 2004-04-02 03:37:29
|
Update of /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16054/src/org/mc4j/console/connection/wizard Modified Files: ConnectionIterator.java ConnectionVisualPanel.java ServerInstallPanel.java Log Message: Centralizing connection specifics in the connection node. Index: ServerInstallPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ServerInstallPanel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ServerInstallPanel.java 1 Apr 2004 03:40:37 -0000 1.6 --- ServerInstallPanel.java 2 Apr 2004 03:25:25 -0000 1.7 *************** *** 131,134 **** --- 131,143 ---- }; + private static final String[] OC4J_SERVER_FILES = + new String[] { + "adminclient.jar", + "ejb.jar", + "oc4j-internal.jar", + "admin_client.jar" + }; + + // You can use a settings object to keep track of state. // Normally the settings object will be the WizardDescriptor, *************** *** 153,158 **** --- 162,174 ---- } else if (ManagementNode.WEBSPHERE_CONNECTION.equals(descriptor.getSettings().getConnectionType())) { serverFiles = null; + } else if (ManagementNode.OC4J_CONNECTION.equals(descriptor.getSettings().getConnectionType())) { + serverFiles = OC4J_SERVER_FILES; } + //todo sab -- a quick hack to make the JSR support work easily for OC4J + //else if (ManagementNode.JSR160_CONNECTION.equals(descriptor.getSettings().getConnectionType())) { + // serverFiles = OC4J_SERVER_FILES; + //} + if (serverFiles != null) { for (int i = 0; i < serverFiles.length; i++) { Index: ConnectionIterator.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionIterator.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ConnectionIterator.java 7 Feb 2004 16:10:41 -0000 1.8 --- ConnectionIterator.java 2 Apr 2004 03:25:25 -0000 1.9 *************** *** 116,120 **** return (ManagementNode.JBOSS_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ManagementNode.WEBLOGIC_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ! ManagementNode.WEBSPHERE_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType())); case 2: return true; --- 116,121 ---- return (ManagementNode.JBOSS_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ManagementNode.WEBLOGIC_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ! ManagementNode.WEBSPHERE_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType()) || ! ManagementNode.OC4J_CONNECTION.equals(this.connectionDescriptor.getSettings().getConnectionType())); case 2: return true; Index: ConnectionVisualPanel.java =================================================================== RCS file: /cvsroot/mc4j/mc4j/src/org/mc4j/console/connection/wizard/ConnectionVisualPanel.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ConnectionVisualPanel.java 1 Mar 2004 18:23:44 -0000 1.12 --- ConnectionVisualPanel.java 2 Apr 2004 03:25:25 -0000 1.13 *************** *** 39,42 **** --- 39,43 ---- import org.openide.util.NbBundle; + import org.mc4j.console.IConnectionNode; import org.mc4j.console.ManagementNode; import org.mc4j.console.swing.ComponentBorder; *************** *** 98,104 **** protected void prefill(String type) { ! String dName = null, dJndiName = null, dInitialContext = null, dServerUrl = null, dPrinciple = null, dCredentials = null; dName = ""; // Everyone needs a name if ("JBoss".equals(type)) { dJndiName = "jmx/rmi/RMIAdaptor"; --- 99,122 ---- protected void prefill(String type) { ! String dName = null, ! dJndiName = null, ! dInitialContext = null, ! dServerUrl = null, ! dPrinciple = null, ! dCredentials = null; dName = ""; // Everyone needs a name + + if (type != null) { + IConnectionNode connectionNode = (IConnectionNode) ManagementNode.buildTestConnection(type); + + + dJndiName = connectionNode.getDefaultJndiName(); + dInitialContext = connectionNode.getDefaultInitialContext(); + dServerUrl = connectionNode.getDefaultServerUrl(); + dPrinciple = connectionNode.getDefaultPrinciple(); + dCredentials = connectionNode.getDefaultCredentials(); + } + /* if ("JBoss".equals(type)) { dJndiName = "jmx/rmi/RMIAdaptor"; *************** *** 126,129 **** --- 144,153 ---- dServerUrl = "http://localhost:8880"; dJndiName = null; + } else if("OC4J".equals(type)) { + dServerUrl="ormi://localhost:23791/default"; + dJndiName = "java:comp/env/ejb/mgmt/MEJB"; + dInitialContext="com.evermind.server.ApplicationClientInitialContextFactory"; + dPrinciple="admin"; + dCredentials=""; } else { *************** *** 134,138 **** dPrinciple = ""; dCredentials = ""; ! } this.jndiNameField.setEnabled(dJndiName != null); --- 158,162 ---- dPrinciple = ""; dCredentials = ""; ! }*/ this.jndiNameField.setEnabled(dJndiName != null); |