本文整理汇总了Java中org.ofbiz.base.util.RMIExtendedSocketFactory类的典型用法代码示例。如果您正苦于以下问题:Java RMIExtendedSocketFactory类的具体用法?Java RMIExtendedSocketFactory怎么用?Java RMIExtendedSocketFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RMIExtendedSocketFactory类属于org.ofbiz.base.util包,在下文中一共展示了RMIExtendedSocketFactory类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.ofbiz.base.util.RMIExtendedSocketFactory; //导入依赖的package包/类
public void init(String[] args, String name, String configFile) throws ContainerException {
this.name =name;
this.configFileLocation = configFile;
ContainerConfig.Container cfg = ContainerConfig.getContainer(name, configFileLocation);
// get the naming (JNDI) port
ContainerConfig.Container.Property port = cfg.getProperty("port");
if (port.value != null) {
try {
this.namingPort = Integer.parseInt(port.value) + Start.getInstance().getConfig().portOffset;
} catch (Exception e) {
throw new ContainerException("Invalid port defined in container [naming-container] configuration or as portOffset; not a valid int");
}
}
// get the naming (JNDI) server
ContainerConfig.Container.Property host = cfg.getProperty("host");
if (host != null && host.value != null) {
this.namingHost = host.value ;
}
try {
rmiSocketFactory = new RMIExtendedSocketFactory( namingHost );
} catch ( UnknownHostException uhEx ) {
throw new ContainerException("Invalid host defined in container [naming-container] configuration; not a valid IP address", uhEx);
}
}
示例2: init
import org.ofbiz.base.util.RMIExtendedSocketFactory; //导入依赖的package包/类
public void init(String[] args, String name, String configFile) throws ContainerException {
this.name =name;
this.configFileLocation = configFile;
ContainerConfig.Container cfg = ContainerConfig.getContainer(name, configFileLocation);
// get the naming (JNDI) port
ContainerConfig.Container.Property port = cfg.getProperty("port");
if (port.value != null) {
try {
this.namingPort = Integer.parseInt(port.value) + ClassLoaderContainer.portOffset;
} catch (Exception e) {
throw new ContainerException("Invalid port defined in container [naming-container] configuration or as portOffset; not a valid int");
}
}
// get the naming (JNDI) server
ContainerConfig.Container.Property host = cfg.getProperty("host");
if (host != null && host.value != null) {
this.namingHost = host.value ;
}
try {
rmiSocketFactory = new RMIExtendedSocketFactory( namingHost );
} catch ( UnknownHostException uhEx ) {
throw new ContainerException("Invalid host defined in container [naming-container] configuration; not a valid IP address", uhEx);
}
}