2013-04-12 27 views
0

我试图在JBoss 7.1.1 Final上设置启用CORBA的应用程序。看起来我错过了一些东西,因为我所尝试的一切都会导致另一个异常。所以,我的尝试:JBoss 7.1.1中的CORBA配置,无法获得NameService

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

那么这里

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

二号线抛出该异常:

(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:] 

我/ conf文件夹包含的条目jacorb.properties

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

任何人都可以携带我照亮黑暗? 谢谢,彼得

回答

1

我发现这个问题的解决方案,Jacorb要求强制配置(jacorb.propeity) 你可以从JBoss的4.2.2

然后

获取文件,你需要包括文件在你的类路径,要做到这一点,我们创建自定义模块

例如去到JBoss modules目录

创建子目录CUS汤姆/的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> 

。希望帮忙,因为它与我一起工作

相关问题