楼主: h1yn

ias904上发布了ejb在客户端怎么来调用,急!!!

[复制链接]
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
11#
 楼主| 发表于 2005-3-10 09:32 | 只看该作者
toracleas
有msn吗,可以加我

使用道具 举报

回复
论坛徽章:
2
ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:07
12#
发表于 2005-3-10 23:36 | 只看该作者
已加。我一般晚上才会在上面。

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
13#
 楼主| 发表于 2005-3-11 08:57 | 只看该作者
现在就是在aix上解决不了这个调用ejb接口的问题,在win2000 advance server 下是可以的

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
14#
 楼主| 发表于 2005-3-11 08:59 | 只看该作者
同样的代码,客户端也是的,

使用道具 举报

回复
论坛徽章:
62
马上加薪
日期:2014-02-19 11:55:142011新春纪念徽章
日期:2011-02-18 11:43:332010广州亚运会纪念徽章:田径
日期:2011-02-17 18:03:352011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:502011新春纪念徽章
日期:2011-01-25 15:41:012010广州亚运会纪念徽章:三项全能
日期:2010-11-15 13:36:51ITPUB9周年纪念徽章
日期:2010-10-08 09:34:02
15#
发表于 2005-3-11 09:19 | 只看该作者
如果真有那么奇怪,建议你找oracle售后处理

使用道具 举报

回复
论坛徽章:
2
ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:07
16#
发表于 2005-3-14 23:27 | 只看该作者
The problem is solved .  The reason is  three network cards are installed  on the machine , so  three ip configured on the machine , please make sure you are using the  right ip  to connect:

>>     1.   using asconsole (port 1810)  , check the rmi port .
>>normally it should be 3201 .
>>     2.   using netstat -an  check the port  you just find ,  please make sure which ip it is using , on  
>>some unix machine , you need to  know which ip it is bound ,   be
>>sure it's the ip you are using  in your code.


Any comments ,  hou_younan ?

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
17#
 楼主| 发表于 2005-3-16 09:53 | 只看该作者
thanks oracleas
我们有两台ibm的小型机,它们是互相备份的,并且每台的机器上都有三块网卡,我一开始用的一个ip,是我们常规的对外的一个Ip,但我用netstat -an查看,发现数据交换用的最多的还是另外一个ip.所以我就换了一个Ip,这样就可以调用了,
本地的调用是ormi://localhost:23791
服务端的是rmi://服务器的Ip:3201(rmi端口)/你的服务名
有关rmi端口,好像只要你的集群里面没有重复的,就可以了,它默认的是3201到3300,但我用的是3112,也是可以的

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
18#
 楼主| 发表于 2005-3-16 10:01 | 只看该作者
一般我的一个应用发大概4-6个利程,这样的话,我的rmi的端口就是3112,3113,3114,3115,3116,3117,

使用道具 举报

回复
论坛徽章:
0
19#
发表于 2005-3-31 19:39 | 只看该作者
我的ejb远程调用的代码如下:
Hashtable env = new Hashtable();
        env.put(Context.PROVIDER_URL,"opmnrmi://192.168.8.109:6004c4j_taiji/DiffServer";
        env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory";
        env.put(Context.SECURITY_AUTHENTICATION,"admin";
        env.put(Context.SECURITY_CREDENTIALS,"oracle9i";
        env.put("dedicated.rmicontext","true";
        try
        {
            Context context = new InitialContext(env);
          DiffServerHome helloHome = (DiffServerHome)context.lookup("DiffServer";
            //DiffServerHome helloHome = (DiffServerHome)PortableRemoteObject.narrow(context.lookup("DiffServer", DiffServerHome.class);
            DiffServer hello= helloHome.create();
            str = hello.SayHello("test";
        }

错误如下:
05/03/31 19:17:52 javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection timed out: connect; nested exception
  is:  

    java.net.ConnectException: Connection timed out: connect [Root exception is java.net.ConnectException: Connection timed out: connect]

05/03/31 19:17:52     at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:153)

05/03/31 19:17:52     at javax.naming.InitialContext.lookup(InitialContext.java:347)
............................

使用道具 举报

回复
论坛徽章:
2
ITPUB十周年纪念徽章
日期:2011-11-01 16:20:28ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:07
20#
发表于 2005-4-5 00:42 | 只看该作者
建议:

1. 检查是否遵循一下规则。
opmnrmi://<opmn_host>:<opmn_port>:<oc4j_instance>/<application-name>

2. 检查端口的设置。

如上述netstat -an 检查opmn绑定的地址和端口。

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表