Thanks, that hint was great! Its exactly what I was looking for :-)
On Jul 30, 2008, at 5:31 PM, Renat Zubairov wrote:
That sounds for me very similar to what OSGI already does quite well,
IMHO Tapestry 5 IOC OSGI integration would be pretty interesting to
see.
Concerning private/public services/interfaces you may consider using
some compile time checks/warnings when such things happening, for
example AspectJ based unit tests.
2008/7/30 Michael Zehender <[EMAIL PROTECTED]>:
Hello Renat,
I'm currently building a product that will integrate with 3rd party
modules.
I want them to use only the published services to prevent them of
developing
bad hacks using the
Internal Services instead, which might change from version to
version. I
want to provide backwards
compatibility for the published services only and don't want to run
into
conflicts because of them
using internal services.
These 3rd party modules 'depend' on the products core services,
they also
contribute to the
configuration of some services (but these are also published).
Michael
On Jul 30, 2008, at 10:26 AM, Renat Zubairov wrote:
Hello Michael,
Would would be the usecases for this feature? Why would you need it?
Are you also planning to have versions for the modules?
How are dependencies between the modules are resolved?
Renat
2008/7/30 Michael Zehender <[EMAIL PROTECTED]>:
Hi,
I'm just looking for a way to configure the visibility of
services within
the IoC container. The target would be
have module internal services i.e. these internal services can be
injected
to services within the same module only.
A short example to illustrate, in the MyCoreModule I want to hide
the
configuration reader and the category factory:
@SubModule( {
MySubModule.class
})
@Marker(MyCore.class)
public class MyCoreModule
{
public static void bind(ServiceBinder binder)
{
binder.bind(CategoryFactory.class,
CategoryFactoryImpl.class).private();
binder.bind(ConfigurationReader.class,
ConfigurationReaderImpl.class).private();
binder.bind(ConfigurationProvider.class,
ConfigurationProviderImpl.class);
binder.bind(ConfigurationStartup.class,
ConfigurationStartupImpl.class);
binder.bind(SystemControl.class,
SystemControlImpl.class);
}
@EagerLoad
public static Startup buildStartup(final List<StartupItem>
startupItems, Logger logger)
{
return new StartupImpl(logger, startupItems);
}
}
Now we have a second Module:
@Marker(MySub.class)
public class MySubModule
{
public static void bind(ServiceBinder binder)
{
// ...
}
public static SomeService buildSomeService(CategoryFactory
factory)
{
// shouldn't be work ! a service not found exception
would
be
the nicest ...
return ...;
}
}
Is this possible? If not is there a plan to implement it?
Thanks,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Best regards,
Renat Zubairov
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Best regards,
Renat Zubairov
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]