Hi,

there are different ways to modularize an application.

A typical use case would be that the main application defines
a service interface it needs and the pluggable jar library
provides an implementation.

In that case the main application and the jar library would both
have their own module desployment descriptor (hivemodule.xml).

The main application defines the requuired services interface via
the service-point element, but doesn't provide an implementation:

  <service-point id="RequiredService" interface="foo.Service">
  </service-point>

The jar library provides the implementation by an implementation element:

  <implementation service-id="RequiredService">
    <create-instance class="foo.impl.ServiceImpl"/>
  </implementation>

At runtime Hivemind assembles the information and returns an instance
of foo.impl.ServiceImpl when the "RequiredService" is requested.

Moreover it is possible that the pluggable jar contributes one or
multiple services to a configuration point defined in the main application.
This principle is used by the EagerLoad and ObjectProvider configurations
for example.

http://hivemind.apache.org/hivemind/EagerLoad.html
http://hivemind.apache.org/hivemind/ObjectProviders.html


Achim



Am Mon, 25 Dec 2006 20:36:02 +0100 schrieb legolas wood <[EMAIL PROTECTED]>:

Thank you for reply.
is there some samples about this subject or some books that i can use?

thanks
James Carman wrote:
It sure can.  I've designed frameworks which allow users to plug in
their own implementations (the "strategy" design pattern) for some
core services.


On 12/24/06, legolas wood <[EMAIL PROTECTED]> wrote:

 Hi
 Thank you for reading my post.
 one module of our application which will be a jar file should be
pluggable.
 indeed, we or our customer will implement this module and our
application
will use its services to complete its tasks.

Now, i want to know whether hivemind can help to build such modularity
system?

 thanks




Reply via email to