当前位置: 首页>>代码示例>>Java>>正文


Java RMIExtendedSocketFactory类代码示例

本文整理汇总了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);
    }

}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:31,代码来源:NamingServiceContainer.java

示例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);
    }

}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:31,代码来源:NamingServiceContainer.java


注:本文中的org.ofbiz.base.util.RMIExtendedSocketFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。