com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef Java Examples
The following examples show how to use
com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RepositoryImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public ServerDef getServer(int serverId) throws ServerNotRegistered { DBServerDef server = getDBServerDef( serverId ) ; ServerDef serverDef = new ServerDef(server.applicationName, server.name, server.classPath, server.args, server.vmArgs); if (debug) System.out.println( "RepositoryImpl: getServer for serverId " + serverId + " returns " + printServerDef( serverDef ) ) ; return serverDef; }
Example #2
Source File: RepositoryImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public int registerServer(ServerDef serverDef) throws ServerAlreadyRegistered, BadServerDefinition { // verify that the entry is valid LegacyServerSocketEndPointInfo endpoint = orb.getLegacyServerSocketManager() .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING); int initSvcPort = ((SocketOrChannelAcceptor)endpoint) .getServerSocket().getLocalPort(); ServerTableEntry entry = new ServerTableEntry( wrapper, illegalServerId, serverDef, (int) initSvcPort, "", true, debug ); switch (entry.verify()) { case ServerMain.OK: break; case ServerMain.MAIN_CLASS_NOT_FOUND: throw new BadServerDefinition("main class not found."); case ServerMain.NO_MAIN_METHOD: throw new BadServerDefinition("no main method found."); case ServerMain.APPLICATION_ERROR: throw new BadServerDefinition("server application error."); default: throw new BadServerDefinition("unknown Exception."); } return registerServer(serverDef, illegalServerId); }
Example #3
Source File: ServerTool.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public boolean processCommand(String[] cmdArgs, ORB orb, PrintStream out) { ServerDef serverDef; // process the list active servers command try { Repository repository = RepositoryHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_REPOSITORY_NAME )); Activator activator = ActivatorHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME )); int[] servers = activator.getActiveServers(); out.println(CorbaResourceUtil.getText("servertool.list2")); ListServers.sortServers(servers); for (int i=0; i < servers.length; i++) { try { serverDef = repository.getServer(servers[i]); out.println("\t " + servers[i] + "\t\t" + serverDef.serverName + "\t\t" + serverDef.applicationName); } catch (ServerNotRegistered e) {} } } catch (Exception ex) { ex.printStackTrace(); } return commandDone; }
Example #4
Source File: RepositoryImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
DBServerDef(ServerDef server, int server_id) { applicationName = server.applicationName ; name = server.serverName; classPath = server.serverClassPath; args = server.serverArgs; vmArgs = server.serverVmArgs; id = server_id; isInstalled = false ; }
Example #5
Source File: ServerTool.java From hottub with GNU General Public License v2.0 | 5 votes |
static void printServerDef(ServerDef serverDef, int serverId, PrintStream out) { out.println(CorbaResourceUtil.getText("servertool.appname", serverDef.applicationName)); out.println(CorbaResourceUtil.getText("servertool.name", serverDef.serverName)); out.println(CorbaResourceUtil.getText("servertool.classpath", serverDef.serverClassPath)); out.println(CorbaResourceUtil.getText("servertool.args", serverDef.serverArgs)); out.println(CorbaResourceUtil.getText("servertool.vmargs", serverDef.serverVmArgs)); out.println(CorbaResourceUtil.getText("servertool.serverid", serverId)); }
Example #6
Source File: ServerTool.java From hottub with GNU General Public License v2.0 | 5 votes |
public boolean processCommand(String[] cmdArgs, ORB orb, PrintStream out) { ServerDef serverDef; // process the list active servers command try { Repository repository = RepositoryHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_REPOSITORY_NAME )); Activator activator = ActivatorHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME )); int[] servers = activator.getActiveServers(); out.println(CorbaResourceUtil.getText("servertool.list2")); ListServers.sortServers(servers); for (int i=0; i < servers.length; i++) { try { serverDef = repository.getServer(servers[i]); out.println("\t " + servers[i] + "\t\t" + serverDef.serverName + "\t\t" + serverDef.applicationName); } catch (ServerNotRegistered e) {} } } catch (Exception ex) { ex.printStackTrace(); } return commandDone; }
Example #7
Source File: RepositoryImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private String printServerDef( ServerDef sd ) { return "ServerDef[applicationName=" + sd.applicationName + " serverName=" + sd.serverName + " serverClassPath=" + sd.serverClassPath + " serverArgs=" + sd. serverArgs + " serverVmArgs=" + sd.serverVmArgs + "]" ; }
Example #8
Source File: RepositoryImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public int registerServer(ServerDef serverDef) throws ServerAlreadyRegistered, BadServerDefinition { // verify that the entry is valid LegacyServerSocketEndPointInfo endpoint = orb.getLegacyServerSocketManager() .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING); int initSvcPort = ((SocketOrChannelAcceptor)endpoint) .getServerSocket().getLocalPort(); ServerTableEntry entry = new ServerTableEntry( wrapper, illegalServerId, serverDef, (int) initSvcPort, "", true, debug ); switch (entry.verify()) { case ServerMain.OK: break; case ServerMain.MAIN_CLASS_NOT_FOUND: throw new BadServerDefinition("main class not found."); case ServerMain.NO_MAIN_METHOD: throw new BadServerDefinition("no main method found."); case ServerMain.APPLICATION_ERROR: throw new BadServerDefinition("server application error."); default: throw new BadServerDefinition("unknown Exception."); } return registerServer(serverDef, illegalServerId); }
Example #9
Source File: RepositoryImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public ServerDef getServer(int serverId) throws ServerNotRegistered { DBServerDef server = getDBServerDef( serverId ) ; ServerDef serverDef = new ServerDef(server.applicationName, server.name, server.classPath, server.args, server.vmArgs); if (debug) System.out.println( "RepositoryImpl: getServer for serverId " + serverId + " returns " + printServerDef( serverDef ) ) ; return serverDef; }
Example #10
Source File: RepositoryImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
DBServerDef(ServerDef server, int server_id) { applicationName = server.applicationName ; name = server.serverName; classPath = server.serverClassPath; args = server.serverArgs; vmArgs = server.serverVmArgs; id = server_id; isInstalled = false ; }
Example #11
Source File: ServerManagerImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private ServerTableEntry getEntry( int serverId ) throws ServerNotRegistered { Integer key = new Integer(serverId); ServerTableEntry entry = null ; synchronized (serverTable) { entry = (ServerTableEntry) serverTable.get(key); if (debug) if (entry == null) { System.out.println( "ServerManagerImpl: getEntry: " + "no active server found." ) ; } else { System.out.println( "ServerManagerImpl: getEntry: " + " active server found " + entry + "." ) ; } if ((entry != null) && (!entry.isValid())) { serverTable.remove(key); entry = null; } if (entry == null) { ServerDef serverDef = repository.getServer(serverId); entry = new ServerTableEntry( wrapper, serverId, serverDef, initialPort, dbDirName, false, debug); serverTable.put(key, entry); entry.activate() ; } } return entry ; }
Example #12
Source File: ServerTool.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public boolean processCommand(String[] cmdArgs, ORB orb, PrintStream out) { ServerDef serverDef; // process the list active servers command try { Repository repository = RepositoryHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_REPOSITORY_NAME )); Activator activator = ActivatorHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME )); int[] servers = activator.getActiveServers(); out.println(CorbaResourceUtil.getText("servertool.list2")); ListServers.sortServers(servers); for (int i=0; i < servers.length; i++) { try { serverDef = repository.getServer(servers[i]); out.println("\t " + servers[i] + "\t\t" + serverDef.serverName + "\t\t" + serverDef.applicationName); } catch (ServerNotRegistered e) {} } } catch (Exception ex) { ex.printStackTrace(); } return commandDone; }
Example #13
Source File: ServerManagerImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
private ServerTableEntry getEntry( int serverId ) throws ServerNotRegistered { Integer key = new Integer(serverId); ServerTableEntry entry = null ; synchronized (serverTable) { entry = (ServerTableEntry) serverTable.get(key); if (debug) if (entry == null) { System.out.println( "ServerManagerImpl: getEntry: " + "no active server found." ) ; } else { System.out.println( "ServerManagerImpl: getEntry: " + " active server found " + entry + "." ) ; } if ((entry != null) && (!entry.isValid())) { serverTable.remove(key); entry = null; } if (entry == null) { ServerDef serverDef = repository.getServer(serverId); entry = new ServerTableEntry( wrapper, serverId, serverDef, initialPort, dbDirName, false, debug); serverTable.put(key, entry); entry.activate() ; } } return entry ; }
Example #14
Source File: RepositoryImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public ServerDef getServer(int serverId) throws ServerNotRegistered { DBServerDef server = getDBServerDef( serverId ) ; ServerDef serverDef = new ServerDef(server.applicationName, server.name, server.classPath, server.args, server.vmArgs); if (debug) System.out.println( "RepositoryImpl: getServer for serverId " + serverId + " returns " + printServerDef( serverDef ) ) ; return serverDef; }
Example #15
Source File: RepositoryImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public int registerServer(ServerDef serverDef) throws ServerAlreadyRegistered, BadServerDefinition { // verify that the entry is valid LegacyServerSocketEndPointInfo endpoint = orb.getLegacyServerSocketManager() .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING); int initSvcPort = ((SocketOrChannelAcceptor)endpoint) .getServerSocket().getLocalPort(); ServerTableEntry entry = new ServerTableEntry( wrapper, illegalServerId, serverDef, (int) initSvcPort, "", true, debug ); switch (entry.verify()) { case ServerMain.OK: break; case ServerMain.MAIN_CLASS_NOT_FOUND: throw new BadServerDefinition("main class not found."); case ServerMain.NO_MAIN_METHOD: throw new BadServerDefinition("no main method found."); case ServerMain.APPLICATION_ERROR: throw new BadServerDefinition("server application error."); default: throw new BadServerDefinition("unknown Exception."); } return registerServer(serverDef, illegalServerId); }
Example #16
Source File: RepositoryImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
DBServerDef(ServerDef server, int server_id) { applicationName = server.applicationName ; name = server.serverName; classPath = server.serverClassPath; args = server.serverArgs; vmArgs = server.serverVmArgs; id = server_id; isInstalled = false ; }
Example #17
Source File: ServerTool.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public boolean processCommand(String[] cmdArgs, ORB orb, PrintStream out) { ServerDef serverDef; // process the list active servers command try { Repository repository = RepositoryHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_REPOSITORY_NAME )); Activator activator = ActivatorHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME )); int[] servers = activator.getActiveServers(); out.println(CorbaResourceUtil.getText("servertool.list2")); ListServers.sortServers(servers); for (int i=0; i < servers.length; i++) { try { serverDef = repository.getServer(servers[i]); out.println("\t " + servers[i] + "\t\t" + serverDef.serverName + "\t\t" + serverDef.applicationName); } catch (ServerNotRegistered e) {} } } catch (Exception ex) { ex.printStackTrace(); } return commandDone; }
Example #18
Source File: ServerTool.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
static void printServerDef(ServerDef serverDef, int serverId, PrintStream out) { out.println(CorbaResourceUtil.getText("servertool.appname", serverDef.applicationName)); out.println(CorbaResourceUtil.getText("servertool.name", serverDef.serverName)); out.println(CorbaResourceUtil.getText("servertool.classpath", serverDef.serverClassPath)); out.println(CorbaResourceUtil.getText("servertool.args", serverDef.serverArgs)); out.println(CorbaResourceUtil.getText("servertool.vmargs", serverDef.serverVmArgs)); out.println(CorbaResourceUtil.getText("servertool.serverid", serverId)); }
Example #19
Source File: ServerManagerImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private ServerTableEntry getEntry( int serverId ) throws ServerNotRegistered { Integer key = new Integer(serverId); ServerTableEntry entry = null ; synchronized (serverTable) { entry = (ServerTableEntry) serverTable.get(key); if (debug) if (entry == null) { System.out.println( "ServerManagerImpl: getEntry: " + "no active server found." ) ; } else { System.out.println( "ServerManagerImpl: getEntry: " + " active server found " + entry + "." ) ; } if ((entry != null) && (!entry.isValid())) { serverTable.remove(key); entry = null; } if (entry == null) { ServerDef serverDef = repository.getServer(serverId); entry = new ServerTableEntry( wrapper, serverId, serverDef, initialPort, dbDirName, false, debug); serverTable.put(key, entry); entry.activate() ; } } return entry ; }
Example #20
Source File: RepositoryImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
DBServerDef(ServerDef server, int server_id) { applicationName = server.applicationName ; name = server.serverName; classPath = server.serverClassPath; args = server.serverArgs; vmArgs = server.serverVmArgs; id = server_id; isInstalled = false ; }
Example #21
Source File: RepositoryImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public ServerDef getServer(int serverId) throws ServerNotRegistered { DBServerDef server = getDBServerDef( serverId ) ; ServerDef serverDef = new ServerDef(server.applicationName, server.name, server.classPath, server.args, server.vmArgs); if (debug) System.out.println( "RepositoryImpl: getServer for serverId " + serverId + " returns " + printServerDef( serverDef ) ) ; return serverDef; }
Example #22
Source File: RepositoryImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public int registerServer(ServerDef serverDef) throws ServerAlreadyRegistered, BadServerDefinition { // verify that the entry is valid LegacyServerSocketEndPointInfo endpoint = orb.getLegacyServerSocketManager() .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING); int initSvcPort = ((SocketOrChannelAcceptor)endpoint) .getServerSocket().getLocalPort(); ServerTableEntry entry = new ServerTableEntry( wrapper, illegalServerId, serverDef, (int) initSvcPort, "", true, debug ); switch (entry.verify()) { case ServerMain.OK: break; case ServerMain.MAIN_CLASS_NOT_FOUND: throw new BadServerDefinition("main class not found."); case ServerMain.NO_MAIN_METHOD: throw new BadServerDefinition("no main method found."); case ServerMain.APPLICATION_ERROR: throw new BadServerDefinition("server application error."); default: throw new BadServerDefinition("unknown Exception."); } return registerServer(serverDef, illegalServerId); }
Example #23
Source File: RepositoryImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private String printServerDef( ServerDef sd ) { return "ServerDef[applicationName=" + sd.applicationName + " serverName=" + sd.serverName + " serverClassPath=" + sd.serverClassPath + " serverArgs=" + sd. serverArgs + " serverVmArgs=" + sd.serverVmArgs + "]" ; }
Example #24
Source File: ServerTool.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public boolean processCommand(String[] cmdArgs, ORB orb, PrintStream out) { ServerDef serverDef; // process the list active servers command try { Repository repository = RepositoryHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_REPOSITORY_NAME )); Activator activator = ActivatorHelper.narrow( orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME )); int[] servers = activator.getActiveServers(); out.println(CorbaResourceUtil.getText("servertool.list2")); ListServers.sortServers(servers); for (int i=0; i < servers.length; i++) { try { serverDef = repository.getServer(servers[i]); out.println("\t " + servers[i] + "\t\t" + serverDef.serverName + "\t\t" + serverDef.applicationName); } catch (ServerNotRegistered e) {} } } catch (Exception ex) { ex.printStackTrace(); } return commandDone; }
Example #25
Source File: ServerTool.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
static void printServerDef(ServerDef serverDef, int serverId, PrintStream out) { out.println(CorbaResourceUtil.getText("servertool.appname", serverDef.applicationName)); out.println(CorbaResourceUtil.getText("servertool.name", serverDef.serverName)); out.println(CorbaResourceUtil.getText("servertool.classpath", serverDef.serverClassPath)); out.println(CorbaResourceUtil.getText("servertool.args", serverDef.serverArgs)); out.println(CorbaResourceUtil.getText("servertool.vmargs", serverDef.serverVmArgs)); out.println(CorbaResourceUtil.getText("servertool.serverid", serverId)); }
Example #26
Source File: ServerManagerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private ServerTableEntry getEntry( int serverId ) throws ServerNotRegistered { Integer key = new Integer(serverId); ServerTableEntry entry = null ; synchronized (serverTable) { entry = (ServerTableEntry) serverTable.get(key); if (debug) if (entry == null) { System.out.println( "ServerManagerImpl: getEntry: " + "no active server found." ) ; } else { System.out.println( "ServerManagerImpl: getEntry: " + " active server found " + entry + "." ) ; } if ((entry != null) && (!entry.isValid())) { serverTable.remove(key); entry = null; } if (entry == null) { ServerDef serverDef = repository.getServer(serverId); entry = new ServerTableEntry( wrapper, serverId, serverDef, initialPort, dbDirName, false, debug); serverTable.put(key, entry); entry.activate() ; } } return entry ; }
Example #27
Source File: RepositoryImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
private String printServerDef( ServerDef sd ) { return "ServerDef[applicationName=" + sd.applicationName + " serverName=" + sd.serverName + " serverClassPath=" + sd.serverClassPath + " serverArgs=" + sd. serverArgs + " serverVmArgs=" + sd.serverVmArgs + "]" ; }
Example #28
Source File: RepositoryImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public ServerDef getServer(int serverId) throws ServerNotRegistered { DBServerDef server = getDBServerDef( serverId ) ; ServerDef serverDef = new ServerDef(server.applicationName, server.name, server.classPath, server.args, server.vmArgs); if (debug) System.out.println( "RepositoryImpl: getServer for serverId " + serverId + " returns " + printServerDef( serverDef ) ) ; return serverDef; }
Example #29
Source File: RepositoryImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public int registerServer(ServerDef serverDef) throws ServerAlreadyRegistered, BadServerDefinition { // verify that the entry is valid LegacyServerSocketEndPointInfo endpoint = orb.getLegacyServerSocketManager() .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING); int initSvcPort = ((SocketOrChannelAcceptor)endpoint) .getServerSocket().getLocalPort(); ServerTableEntry entry = new ServerTableEntry( wrapper, illegalServerId, serverDef, (int) initSvcPort, "", true, debug ); switch (entry.verify()) { case ServerMain.OK: break; case ServerMain.MAIN_CLASS_NOT_FOUND: throw new BadServerDefinition("main class not found."); case ServerMain.NO_MAIN_METHOD: throw new BadServerDefinition("no main method found."); case ServerMain.APPLICATION_ERROR: throw new BadServerDefinition("server application error."); default: throw new BadServerDefinition("unknown Exception."); } return registerServer(serverDef, illegalServerId); }
Example #30
Source File: RepositoryImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private String printServerDef( ServerDef sd ) { return "ServerDef[applicationName=" + sd.applicationName + " serverName=" + sd.serverName + " serverClassPath=" + sd.serverClassPath + " serverArgs=" + sd. serverArgs + " serverVmArgs=" + sd.serverVmArgs + "]" ; }