You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by liu jie <cn...@yahoo.com.cn> on 2003/07/15 10:38:37 UTC
JNDI & Serviceable
a component can access service(the same blocks
dependecies) using JNDI
pattern,nether Serviceable interface
a method of component B access dependencies
Compoenent A like this:
com.aa.ServiceA a = (ServiceA) new
InitialContext().lookup( "com.aa.ServiceA" );
why i want this pattern:
because when my component drive other objects, i
always must transfer the
ServiceManager to these objects.
for example:
when my block drive Axis SOAP engine, the soap drive
a object method to handle
a soap message, and response a soap message, this
often in XML RPC pattern, in my object
method, if i want to acess some other service in the
same block, this method must have
ServiceManager, this often difficult and painful...,
if in my method i can access service
using jndi pattern, it's very good.
i sum, i want to a component access it's dependences
components not directly using Serviceable
Interface and ServiceManager, but using JNDI...
_________________________________________________________
Do You Yahoo!?
国内电邮用户反垃圾调查拉开帷幕
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.tech.yahoo.com/zhuanti/laji/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org