ejb-jar.xml
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Build</ejb-name>
<home>com.augmentum.inquira.ejb.build.BuildHome</home>
<remote>com.augmentum.inquira.ejb.build.Build</remote>
<ejb-class>com.augmentum.inquira.ejb.build.BuildBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <cmp-version>2.x</cmp-version>
<abstract-schema-name>BuildBean</abstract-schema-name> <cmp-field>
<field-name>buildId</field-name>
</cmp-field>
</entity>
</enterprise-beans>
<ejb-jar>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Build</ejb-name>
<home>com.augmentum.inquira.ejb.build.BuildHome</home>
<remote>com.augmentum.inquira.ejb.build.Build</remote>
<ejb-class>com.augmentum.inquira.ejb.build.BuildBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <cmp-version>2.x</cmp-version>
<abstract-schema-name>BuildBean</abstract-schema-name> <cmp-field>
<field-name>buildId</field-name>
</cmp-field>
</entity>
</enterprise-beans>
<ejb-jar>
解决方案 »
- J2EE项目代码编写规范
- File f = new File(filePath) f.exists() 为false 求大神
- 现在互联网领域最缺的是什么 来者有分哦???
- 为什么在weblogic下无法访问MainTn?wsdl
- spring注入问题(在线等)
- 我用eclipse写的一段webservice代码大家帮忙看看。
- session中find方法和createQuery方法有什么区别?
- 请大家推荐一本从宏观上介绍J2EE各种技术的书籍
- sax2大数据优化方案,分不够在加
- 有关myeclipse的struts2项目,启动tomcat服务器的问题,下面是日志信息
- 如何能成功解析这个xml文件(包含“<”等非法字符)
- 怎么把用java开发的应用制作成类似windows的安装程序呢?可以方便用户安装
<jboss> <unauthenticated-principal>nobody</unauthenticated-principal> <enterprise-beans>
<entity>
<ejb-name>Build</ejb-name>
<jndi-name>BuildBean</jndi-name>
<local-jndi-name>BuildLocal</local-jndi-name> </entity>
</enterprise-beans> <resource-managers>
</resource-managers></jboss>
DealXml xml = new DealXml();
String topTaisIP = xml.getTopTaisInfo(); Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://" + topTaisIP); try {
ctx = new InitialContext(ht);
PrefixHome prefixHome = (PrefixHome) ctx.lookup("PrefixBean");
Prefix prefix = prefixHome.create();
} catch (NamingException ex) {
prefix = null;
log.sysLog.error(ex.getMessage());
} catch (RemoteException e) {
prefix = null;
log.sysLog.error(e.getMessage());
} catch (CreateException e) {
prefix = null;
log.sysLog.error(e.getMessage());
}我想jboss上面也大同小异吧:)
String topTaisIP = xml.getTopTaisInfo();是通过一个config.xml文件取服务器为topTais的ip及端口
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, "另一台机器的IP:8080");
Context context = new InitialContext(properties); XXHome jbossHome = (XXHome) context.lookup(
"XXX");
XXREMOTE userInfo = jbossHome.create("");注意要把你的另台机器的 XX.JAR包COPY过来呀! 不知道是这个意思吗?
#org.omg.CORBA.ORBInitialHost=localhost
#org.omg.CORBA.ORBInitialPort=1050
#java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory#com.sun.jndi.rmi.registry.RegistryContextFactory
#com.sun.enterprise.naming.SerialInitContextFactory
#java.naming.factory.url.pkgs.Naming=com.sun.enterprise.naming
#java.naming.provider.url=rmi://localhost:1050# Orion 1.5.2
#java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
#java.naming.provider.url=ormi://localhost/facade
#java.naming.security.principal=admin
#java.naming.security.credentials=123# JBoss
# requires JBoss /client JARS:
# jboss-client.jar, jnp-client.jar, jbosssx-client.jar
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=另一台机器的IP
java.naming.factory.url.pkgs=org.jboss.naming