Hello.

This was discussed before, but I don't think there was any resolution.  Out
current service dependency contracts look something like this:

  /**
   * @avalon.dependency type="org.proj.MyService" key="myService "
   */
  public void service(ServiceManager serviceManager) throws ServiceException
  {
    MyService srv = (MyService) serviceManager.lookup("myService");
    getLogger().info("Hello!  we got this service = "+srv.ROLE);
  }

which is all well and good -- _IF_ you know what services you need to lookup
at build and deployment time.

If you have a component which looks up arbitrary services which are perhaps
given in the configuration (like the Codehaus Ivory project) then you're
going to have issues if you MUST declare service dependencies, which is the
case for Merlin.

In Merlin if you build the above code, and leave out the @avalon.dependency
tag, then deployment fails.  Even leaving out the 'key' attribute will cause
this to fail.  While I understand dependency resolution is important, we
need to have a way to support runtime dependencies.

Even something like a wildcard would be nice:

@avalon.dependency type="org.proj.MyService" key="*"

This bring me back to an older discussion [1] about lookup methods.  At the
time Berin put together the following:

Lookup Method                         | ECM | Fortress | Merlin | Phoenix
--------------------------------------+-----+----------+--------+--------
Object   <- lookup("alias")           |     |          |   X    |   X
Object   <- lookup(ROLE)              |  X  |     X    |   X    |   X
Object   <- lookup(ROLE+"/alias")     |     |     X    |        |   X
List     <- lookup(ROLE+"[]")         |     |          |        |   X
Map      <- lookup(ROLE+"{}")         |     |          |        |   X
Selector <- lookup(ROLE+"Selector")   |  X  |     X    |        |

(edited to provide accurate Merlin status)

Since Merlin is aiming at being _the_ container, what lookup methods will it
support?

Thanks!

J. Aaron Farr
� SONY ELECTRONICS
� DDP-CIM
� (724) 696-7653

[1] http://www.mail-archive.com/[EMAIL PROTECTED]/msg06296.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to