简体   繁体   English

JBoss 7.1.1中的CORBA配置,无法获取NameService

[英]CORBA Configuration in JBoss 7.1.1, Unable to get NameService

I'm trying to setup a CORBA enabled application on JBoss 7.1.1 Final. 我正在尝试在JBoss 7.1.1 Final上设置启用CORBA的应用程序。 It seems that I'm missing something because everything I try results in another exception. 似乎我缺少了一些东西,因为我尝试的所有事情都会导致另一个异常。 So, what I tried: 因此,我尝试了什么:

standalone -c standalone-ha.xml -Djboss.node.name=nodeA or
standalone -c standalone-full-ha.xml -Djboss.node.name=nodeA    

then the 2nd line here 然后第二行

GlobalData.orb = org.omg.CORBA.ORB.init(args, p);
orb.resolve_initial_references("NameService");

throws the exception: 引发异常:

(MSC service thread 1-9) IDL:omg.org/CORBA/ORB/InvalidName:1.0: org.omg.CORBA.ORBPackage.InvalidName: IDL:omg.org/CORBA/ORB/InvalidName:1.0
    at org.jacorb.orb.ORB.resolve_initial_references(ORB.java:1343) [jacorb-2.3.1.jbossorg-1.jar:]
    at MyApp.startServer(MyApp.java:145) [server.jar:]

My /conf folder contains a jacorb.properties with the entry 我的/ conf文件夹包含一个jacorb.properties及其条目

ORBInitRef.NameService=corbaloc::localhost:3828/JBoss/Naming/root

Can anyone bring some light into the dark? 谁能将一些光带入黑暗? Thanks, Peter 谢谢彼得

I found solution for that problem, Jacorb require mandatory configuration (jacorb.propeity) you can get that file from JBoss 4.2.2 我找到了解决该问题的方法,Jacorb需要强制配置(jacorb.propeity),您可以从JBoss 4.2.2中获取该文件。

Then 然后

you need to include that file in your class path, to do that we create custom module 您需要将该文件添加到您的类路径中,以创建自定义模块

for instance go to jboss modules directory 例如转到jboss modules目录

create sub directory custom/myconfig/main for example 例如创建子目录custom / myconfig / main

there add your property files 在那里添加您的属性文件

create module.xml file .. you will chose module name... for instnace custom.myconfig 创建module.xml文件..您将为Instnace custom.myconfig选择模块名称...

<module xmlns="urn:jboss:module:1.1" name="custom.myconfig">
    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <resources>
        <resource-root path="."/>
        <!-- Insert resources here -->
    </resources>

    <dependencies>     
    </dependencies>
</module>

In your jboss-deployment-structure.xml include this module to your app


<jboss-deployment-structure>
    <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
    <deployment>
        <dependencies>
            <module name="custom.myconfig/>
        </dependencies>
        <resources>
        </resources>
    </deployment>

    <sub-deployment name="My_WAR.war">
        <dependencies>
            <module name="custom.myconfig" />
        </dependencies>
    </sub-deployment>

Hope that help as it work with me 希望能对我有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM