网站地图
  
  高级搜索
  首页   技术论坛   博客 派计划   产品中心   资源中心   银弹在线   商城  





怎样使用SCA来绑定一个外部的EJB    
#1楼
给作者发送短消息 给作者发送短消息  
查看用户其他信息
总分 14 分
财富 14 goCom币
威望 1
排名 :(
段位 新手必读

查了一个外文文档

/binding.ejb/@uri – optional attribute that specifies the URI of a session bean endpoint.
For EJB 2.x, this is the endpoint of the session home. For interoperability the form of the URI
is defined by CORBA in the CORBA Services specification [2], and is a standard URI form for
referring to remotable CORBA objects. Briefly, the corbaname URI format looks like this:
corbaname:iiop:<hostName>:<port>/<key string>#<path to home>
Typically, a corbaname URI doesn’t include all these components. The following example
shows a corbaname URI that uses the default ORB configuration to find an EJB home at
ejb/MyHome in the JNDI directory:
corbaname:rir:#ejb/MyHome
Other forms of URI specification are admissible when interoperability is of no concern.

上面说了这两种方法(蓝色字体)

这个是 Consuming an Existing EJB SOA Service 的例子

<reference name="CandidateCheck">
   <interface.java interface="com.app.jobbank.CandidateChk"/>
   <binding.ejb uri="corbaname:rir:#ejb/CandidateChkHome"/>
</reference >

用的是上面的第二种方法。

对于第一种方法,不太明白那个<key string>和<path to home>的具体填写规则。

对于第二种方法,不明白如果不写ip地址的话,怎么来找到外部的EJB。

请高手帮忙指点一下。


 

 

Re: 怎样使用SCA来绑定一个外部的EJB    
#2楼
给作者发送短消息 给作者发送短消息 实名会员 
查看用户其他信息
总分 344 分
财富 1229 goCom币
威望 2003
排名 :(
段位 新手必读
binding.ejb的用法完全是按照corba的调用方式进行的.
key string为NameService的root.
如果不写IP,采用的是默认,内部实现采用的是org.omg.CORBA.ORB.string_to_object("corbaname:rir:#ejb/CandidateChkHome"),其具体含义请查看Corba的定义。(对corba不是很熟悉,仅从实现上提供参考)
 

Re: 怎样使用SCA来绑定一个外部的EJB    
#3楼
给作者发送短消息 给作者发送短消息  
查看用户其他信息
总分 14 分
财富 14 goCom币
威望 1
排名 :(
段位 新手必读
如果不写IP,采用的是默认,这个还是不明白,如果在两台服务器部署同一个EJB,那SCA会找哪个呢??
我对corba也是半点都不熟悉
 

Re: 怎样使用SCA来绑定一个外部的EJB    
#4楼
给作者发送短消息 给作者发送短消息 实名会员 商务会员 
查看用户其他信息
总分 2915 分
财富 3234 goCom币
威望 60
排名 第 79 名
段位 新手必读
 

Re: 怎样使用SCA来绑定一个外部的EJB    
#5楼
给作者发送短消息 给作者发送短消息 实名会员 
查看用户其他信息
总分 34 分
财富 484 goCom币
威望 2003
排名 :(
段位 新手必读
corbaname:iiop::/#


这里的key表示 的是 命名服务的 根, path表示 相对这个根的位置。

corbaname:rir:#ejb/MyHome

这个是不用写IP的,因为 rir 默认表示 iiop://localhost:2089/
 




发表回复
账号用户名   密码   登录
内容:url email imgsrc image code quote
范例 Example
bold italic underline linethrough   


 [更多...]