You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Halbert <jo...@su3analytics.com> on 2011/01/06 12:53:49 UTC

tapestry ioc

As I understand it Tapestry-IOC will autoload any modules that it finds.

http://tapestry.apache.org/autoloading-modules.html


Is there a way to explicitly disable the loading of certain modules,
other than removing the jar in which the module is packaged from the
classpath?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Howard Lewis Ship <hl...@gmail.com>.
It needs to be documented.  Maybe I'll find time soon.  I really need to
finish the tutorial itself!

It is very useful.

I use it to separate my production configuration from my test configuration.

On Thu, Jan 6, 2011 at 7:46 AM, Josh Canfield <jo...@gmail.com>wrote:

> If you provide a jar with 100 modules that can be enabled/disabled
> then don't provide the manifest entry and resort to providing modules
> via tapestry.modules system property...
>
> > Searching the mailing list archives I've found this thread with a
> solution
> > for disabling the autoloading of given modules:
> >
> http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
>
> This solution doesn't look like it will work in the current codebase.
> If you disable default modules (via the MANIFEST) you are also
> disabling tapestry.modules (see line 138 of TapestryAppInitializer and
> line 80 of IOCUtilities). That seems like a defect to me, and probably
> got in as part of a refactoring.
>
> There is a context parameter that you can use to add modules after
> you've disabled auto loading. tapestry.MODE-modules, where mode is
> defined by the system property tapestry.execution-mode (defaults to
> production)
>
> I don't think I've ever seen this documented, or felt the need to use it.
>
> Josh
>
>
> On Thu, Jan 6, 2011 at 7:23 AM, Thiago H. de Paula Figueiredo
> <th...@gmail.com> wrote:
> > On Thu, 06 Jan 2011 13:07:34 -0200, Joel Halbert <jo...@su3analytics.com>
> > wrote:
> >
> >>> why cant you take the jar from the classpath?
> >>
> >> This is what I have done, but it strikes me as quite a blunt instrument
> >> to use for configuring an application. Does it really mean you need a
> >> jar per service, if the user of the jar might want to selectively enable
> >> some of the services but not others?
> >
> > One JAR can have as many modules as you want, so you don't need one JAR
> per
> > service. And Tapestry-IoC doesn't offer any way of selectively enable or
> > disable services provided by a module. IMHO I don't miss this feature at
> > all.
> >
> > Searching the mailing list archives I've found this thread with a
> solution
> > for disabling the autoloading of given modules:
> >
> http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and
> > instructor
> > Owner, Ars Machina Tecnologia da Informação Ltda.
> > http://www.arsmachina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: tapestry ioc

Posted by Joel Halbert <jo...@su3analytics.com>.
> I haven't used this library yet, so I don't know if it needs
> SpringModule  
> or not. I guess it does, as Howard wrotes it and SpringModule is
> there.  
> But that's just a guess. :)

No, it doesn't use it, it just happened to be in my classpath.


On Fri, 2011-01-07 at 09:08 -0200, Thiago H. de Paula Figueiredo wrote:
> On Fri, 07 Jan 2011 07:46:39 -0200, Joel Halbert <jo...@su3analytics.com>  
> wrote:
> 
> > Actually - it all stemmed from me just wanting to exclude the
> > SpringModule when using the tapx templating library for sending html
> > emails!
> 
> I haven't used this library yet, so I don't know if it needs SpringModule  
> or not. I guess it does, as Howard wrotes it and SpringModule is there.  
> But that's just a guess. :)
> 
> > Since that's a standalone app that just uses tapx & tap-ioc (no web
> > component) it just got me thinking about using Tap-IOC for my other
> > standalone, non Tapestry5 web based, projects (hence all the questons!).
> 
> I use Tapestry-IoC for non-web projects too. :)
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 07 Jan 2011 07:46:39 -0200, Joel Halbert <jo...@su3analytics.com>  
wrote:

> Actually - it all stemmed from me just wanting to exclude the
> SpringModule when using the tapx templating library for sending html
> emails!

I haven't used this library yet, so I don't know if it needs SpringModule  
or not. I guess it does, as Howard wrotes it and SpringModule is there.  
But that's just a guess. :)

> Since that's a standalone app that just uses tapx & tap-ioc (no web
> component) it just got me thinking about using Tap-IOC for my other
> standalone, non Tapestry5 web based, projects (hence all the questons!).

I use Tapestry-IoC for non-web projects too. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Joel Halbert <jo...@su3analytics.com>.
Actually - it all stemmed from me just wanting to exclude the
SpringModule when using the tapx templating library for sending html
emails! 

Since that's a standalone app that just uses tapx & tap-ioc (no web
component) it just got me thinking about using Tap-IOC for my other
standalone, non Tapestry5 web based, projects (hence all the questons!).


On Thu, 2011-01-06 at 15:23 -0800, Josh Canfield wrote:
> > Again, it doesn't seem right to have to consider what are effectively runtime deployment configuration options when building an application into a jar.
> 
> This is funny because I thought that is exactly what you are trying to
> do. If you are going to exclude modules from a deployment but don't
> want to do it from system properties, then you must be creating an app
> module that uses your multi-module jar? If that's the case then you
> can define your dependencies using the @SubModule annotation on your
> deployed AppModule. If all of your included modules also define their
> dependencies this way then you don't have to worry about extra's
> getting loaded, just don't use the Manifest auto-loading.
> 
> I prefer this method because it also documents your dependencies.
> 
> If you are putting third party modules that use the auto-loading into
> your classpath... then just don't do that.
> 
> Josh
> 
> 
> 
> On Thu, Jan 6, 2011 at 8:37 AM, Joel Halbert <jo...@su3analytics.com> wrote:
> >
> >> > > - if you have lots of modules, which a client may want to selectively
> >> > > enable, do not declare them in the manifest, but instead let the client
> >> > > use the tapestry.modules sys property to selectively enabl
> >
> > But that's sort of my point - configuring IOC via a system property doesn't seem right, especially if all I wanted to do was disable 1 of many services.
> >
> >
> >
> >> > This looks like a huge JAR. Why not break it in smaller, more manageable
> >> > ones?
> >
> > Again, it doesn't seem right to have to consider what are effectively runtime deployment configuration options when building an application into a jar.
> >
> >
> >
> >
> > On Thu, 2011-01-06 at 14:15 -0200, Thiago H. de Paula Figueiredo wrote:
> >> On Thu, 06 Jan 2011 14:09:02 -0200, Joel Halbert <jo...@su3analytics.com>
> >> wrote:
> >>
> >> > So if I understand correctly:
> >> >
> >> > - the only way to disable modules that are specified in the manifest is
> >> > to remove the jar from the classpath
> >>
> >> Wrong. See
> >> http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
> >>
> >> > - if you have lots of modules, which a client may want to selectively
> >> > enable, do not declare them in the manifest, but instead let the client
> >> > use the tapestry.modules sys property to selectively enable them
> >>
> >> This looks like a huge JAR. Why not break it in smaller, more manageable
> >> ones?
> >> You can also use @SubModule in a module class to include other modules
> >> automatically without using system properties or context parameters.
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Josh Canfield <jo...@gmail.com>.
> Again, it doesn't seem right to have to consider what are effectively runtime deployment configuration options when building an application into a jar.

This is funny because I thought that is exactly what you are trying to
do. If you are going to exclude modules from a deployment but don't
want to do it from system properties, then you must be creating an app
module that uses your multi-module jar? If that's the case then you
can define your dependencies using the @SubModule annotation on your
deployed AppModule. If all of your included modules also define their
dependencies this way then you don't have to worry about extra's
getting loaded, just don't use the Manifest auto-loading.

I prefer this method because it also documents your dependencies.

If you are putting third party modules that use the auto-loading into
your classpath... then just don't do that.

Josh



On Thu, Jan 6, 2011 at 8:37 AM, Joel Halbert <jo...@su3analytics.com> wrote:
>
>> > > - if you have lots of modules, which a client may want to selectively
>> > > enable, do not declare them in the manifest, but instead let the client
>> > > use the tapestry.modules sys property to selectively enabl
>
> But that's sort of my point - configuring IOC via a system property doesn't seem right, especially if all I wanted to do was disable 1 of many services.
>
>
>
>> > This looks like a huge JAR. Why not break it in smaller, more manageable
>> > ones?
>
> Again, it doesn't seem right to have to consider what are effectively runtime deployment configuration options when building an application into a jar.
>
>
>
>
> On Thu, 2011-01-06 at 14:15 -0200, Thiago H. de Paula Figueiredo wrote:
>> On Thu, 06 Jan 2011 14:09:02 -0200, Joel Halbert <jo...@su3analytics.com>
>> wrote:
>>
>> > So if I understand correctly:
>> >
>> > - the only way to disable modules that are specified in the manifest is
>> > to remove the jar from the classpath
>>
>> Wrong. See
>> http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
>>
>> > - if you have lots of modules, which a client may want to selectively
>> > enable, do not declare them in the manifest, but instead let the client
>> > use the tapestry.modules sys property to selectively enable them
>>
>> This looks like a huge JAR. Why not break it in smaller, more manageable
>> ones?
>> You can also use @SubModule in a module class to include other modules
>> automatically without using system properties or context parameters.
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Howard Lewis Ship <hl...@gmail.com>.
On Thu, Jan 6, 2011 at 8:45 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Thu, 06 Jan 2011 14:37:43 -0200, Joel Halbert <jo...@su3analytics.com>
> wrote:
>
>  > > - if you have lots of modules, which a client may want to selectively
>>> > > enable, do not declare them in the manifest, but instead let the
>>> client
>>> > > use the tapestry.modules sys property to selectively enabl
>>>
>>
>> But that's sort of my point - configuring IOC via a system property
>> doesn't seem right, especially if all I wanted to do was disable 1 of many
>> services.
>>
>
> It's not configuring the whole IoC via a system property. It's just an
> additional way of configuring it. Don't forget the @SubModule annotation.
>
> Again, there's no way of disabling individual services, just T-IoC modules.
> I don't know any IoC container that does that.
>
>
>  > This looks like a huge JAR. Why not break it in smaller, more manageable
>>> > ones?
>>>
>>
>> Again, it doesn't seem right to have to consider what are effectively
>> runtime deployment configuration options when building an application into a
>> jar.
>>
>
> Don't forget the @SubModule annotation.
>
> I think you should consider JARs as self-contained black boxes. If you add
> one to the classpath, you want all services in it. If there's a set of
> services that you may not use, create a separate JAR for them. Why put
> services you won't use in a JAR you'll use? But that's just my opinion, of
> course. :)
>

If you are using Gradle instead of Maven, it's much more reasonable to crank
out many small JARs.


>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to learn
how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Re: tapestry ioc

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 06 Jan 2011 14:37:43 -0200, Joel Halbert <jo...@su3analytics.com>  
wrote:

>> > > - if you have lots of modules, which a client may want to  
>> selectively
>> > > enable, do not declare them in the manifest, but instead let the  
>> client
>> > > use the tapestry.modules sys property to selectively enabl
>
> But that's sort of my point - configuring IOC via a system property  
> doesn't seem right, especially if all I wanted to do was disable 1 of  
> many services.

It's not configuring the whole IoC via a system property. It's just an  
additional way of configuring it. Don't forget the @SubModule annotation.

Again, there's no way of disabling individual services, just T-IoC  
modules. I don't know any IoC container that does that.

>> > This looks like a huge JAR. Why not break it in smaller, more  
>> manageable
>> > ones?
>
> Again, it doesn't seem right to have to consider what are effectively  
> runtime deployment configuration options when building an application  
> into a jar.

Don't forget the @SubModule annotation.

I think you should consider JARs as self-contained black boxes. If you add  
one to the classpath, you want all services in it. If there's a set of  
services that you may not use, create a separate JAR for them. Why put  
services you won't use in a JAR you'll use? But that's just my opinion, of  
course. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Joel Halbert <jo...@su3analytics.com>.
> > > - if you have lots of modules, which a client may want to selectively
> > > enable, do not declare them in the manifest, but instead let the client
> > > use the tapestry.modules sys property to selectively enabl

But that's sort of my point - configuring IOC via a system property doesn't seem right, especially if all I wanted to do was disable 1 of many services.



> > This looks like a huge JAR. Why not break it in smaller, more manageable  
> > ones?

Again, it doesn't seem right to have to consider what are effectively runtime deployment configuration options when building an application into a jar.




On Thu, 2011-01-06 at 14:15 -0200, Thiago H. de Paula Figueiredo wrote:
> On Thu, 06 Jan 2011 14:09:02 -0200, Joel Halbert <jo...@su3analytics.com>  
> wrote:
> 
> > So if I understand correctly:
> >
> > - the only way to disable modules that are specified in the manifest is
> > to remove the jar from the classpath
> 
> Wrong. See  
> http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
> 
> > - if you have lots of modules, which a client may want to selectively
> > enable, do not declare them in the manifest, but instead let the client
> > use the tapestry.modules sys property to selectively enable them
> 
> This looks like a huge JAR. Why not break it in smaller, more manageable  
> ones?
> You can also use @SubModule in a module class to include other modules  
> automatically without using system properties or context parameters.
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 06 Jan 2011 14:09:02 -0200, Joel Halbert <jo...@su3analytics.com>  
wrote:

> So if I understand correctly:
>
> - the only way to disable modules that are specified in the manifest is
> to remove the jar from the classpath

Wrong. See  
http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html

> - if you have lots of modules, which a client may want to selectively
> enable, do not declare them in the manifest, but instead let the client
> use the tapestry.modules sys property to selectively enable them

This looks like a huge JAR. Why not break it in smaller, more manageable  
ones?
You can also use @SubModule in a module class to include other modules  
automatically without using system properties or context parameters.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Joel Halbert <jo...@su3analytics.com>.
So if I understand correctly:

- the only way to disable modules that are specified in the manifest is
to remove the jar from the classpath

- if you have lots of modules, which a client may want to selectively
enable, do not declare them in the manifest, but instead let the client
use the tapestry.modules sys property to selectively enable them


These both seem like pretty blunt options, and would discourage me from
using tap-ioc as a standalone framework for runtime configuration.




On Thu, 2011-01-06 at 07:46 -0800, Josh Canfield wrote:
> If you provide a jar with 100 modules that can be enabled/disabled
> then don't provide the manifest entry and resort to providing modules
> via tapestry.modules system property...
> 
> > Searching the mailing list archives I've found this thread with a solution
> > for disabling the autoloading of given modules:
> > http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
> 
> This solution doesn't look like it will work in the current codebase.
> If you disable default modules (via the MANIFEST) you are also
> disabling tapestry.modules (see line 138 of TapestryAppInitializer and
> line 80 of IOCUtilities). That seems like a defect to me, and probably
> got in as part of a refactoring.
> 
> There is a context parameter that you can use to add modules after
> you've disabled auto loading. tapestry.MODE-modules, where mode is
> defined by the system property tapestry.execution-mode (defaults to
> production)
> 
> I don't think I've ever seen this documented, or felt the need to use it.
> 
> Josh
> 
> 
> On Thu, Jan 6, 2011 at 7:23 AM, Thiago H. de Paula Figueiredo
> <th...@gmail.com> wrote:
> > On Thu, 06 Jan 2011 13:07:34 -0200, Joel Halbert <jo...@su3analytics.com>
> > wrote:
> >
> >>> why cant you take the jar from the classpath?
> >>
> >> This is what I have done, but it strikes me as quite a blunt instrument
> >> to use for configuring an application. Does it really mean you need a
> >> jar per service, if the user of the jar might want to selectively enable
> >> some of the services but not others?
> >
> > One JAR can have as many modules as you want, so you don't need one JAR per
> > service. And Tapestry-IoC doesn't offer any way of selectively enable or
> > disable services provided by a module. IMHO I don't miss this feature at
> > all.
> >
> > Searching the mailing list archives I've found this thread with a solution
> > for disabling the autoloading of given modules:
> > http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> > instructor
> > Owner, Ars Machina Tecnologia da Informação Ltda.
> > http://www.arsmachina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Josh Canfield <jo...@gmail.com>.
If you provide a jar with 100 modules that can be enabled/disabled
then don't provide the manifest entry and resort to providing modules
via tapestry.modules system property...

> Searching the mailing list archives I've found this thread with a solution
> for disabling the autoloading of given modules:
> http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html

This solution doesn't look like it will work in the current codebase.
If you disable default modules (via the MANIFEST) you are also
disabling tapestry.modules (see line 138 of TapestryAppInitializer and
line 80 of IOCUtilities). That seems like a defect to me, and probably
got in as part of a refactoring.

There is a context parameter that you can use to add modules after
you've disabled auto loading. tapestry.MODE-modules, where mode is
defined by the system property tapestry.execution-mode (defaults to
production)

I don't think I've ever seen this documented, or felt the need to use it.

Josh


On Thu, Jan 6, 2011 at 7:23 AM, Thiago H. de Paula Figueiredo
<th...@gmail.com> wrote:
> On Thu, 06 Jan 2011 13:07:34 -0200, Joel Halbert <jo...@su3analytics.com>
> wrote:
>
>>> why cant you take the jar from the classpath?
>>
>> This is what I have done, but it strikes me as quite a blunt instrument
>> to use for configuring an application. Does it really mean you need a
>> jar per service, if the user of the jar might want to selectively enable
>> some of the services but not others?
>
> One JAR can have as many modules as you want, so you don't need one JAR per
> service. And Tapestry-IoC doesn't offer any way of selectively enable or
> disable services provided by a module. IMHO I don't miss this feature at
> all.
>
> Searching the mailing list archives I've found this thread with a solution
> for disabling the autoloading of given modules:
> http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 06 Jan 2011 13:07:34 -0200, Joel Halbert <jo...@su3analytics.com>  
wrote:

>> why cant you take the jar from the classpath?
>
> This is what I have done, but it strikes me as quite a blunt instrument
> to use for configuring an application. Does it really mean you need a
> jar per service, if the user of the jar might want to selectively enable
> some of the services but not others?

One JAR can have as many modules as you want, so you don't need one JAR  
per service. And Tapestry-IoC doesn't offer any way of selectively enable  
or disable services provided by a module. IMHO I don't miss this feature  
at all.

Searching the mailing list archives I've found this thread with a solution  
for disabling the autoloading of given modules:  
http://tapestry.1045711.n5.nabble.com/T5-disable-loading-specified-module-td2431110.html

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Joel Halbert <jo...@su3analytics.com>.
> why cant you take the jar from the classpath?

This is what I have done, but it strikes me as quite a blunt instrument
to use for configuring an application. Does it really mean you need a
jar per service, if the user of the jar might want to selectively enable
some of the services but not others?
 


On Thu, 2011-01-06 at 06:56 -0800, Josh Canfield wrote:
> That quote doesn't help because its in the manifest of the jar you want to
> exclude... why cant you take the jar from the classpath?
> On Jan 6, 2011 6:53 AM, "Josh Canfield" <jo...@gmail.com> wrote:
> > From the link; "Module autoloading isn't 100% free ... you must tell
> > Tapestry IoC where the modules to load are located, which can be done via
> a
> > Manifest file entry, or via an annotation."
> >
> > I don't believe being in the classpath is enough. I'm not sure there is a
> > way to prevent a dependent module from loading.
> > On Jan 6, 2011 3:54 AM, "Joel Halbert" <jo...@su3analytics.com> wrote:
> >> As I understand it Tapestry-IOC will autoload any modules that it finds.
> >>
> >> http://tapestry.apache.org/autoloading-modules.html
> >>
> >>
> >> Is there a way to explicitly disable the loading of certain modules,
> >> other than removing the jar in which the module is packaged from the
> >> classpath?
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry ioc

Posted by Josh Canfield <jo...@gmail.com>.
That quote doesn't help because its in the manifest of the jar you want to
exclude... why cant you take the jar from the classpath?
On Jan 6, 2011 6:53 AM, "Josh Canfield" <jo...@gmail.com> wrote:
> From the link; "Module autoloading isn't 100% free ... you must tell
> Tapestry IoC where the modules to load are located, which can be done via
a
> Manifest file entry, or via an annotation."
>
> I don't believe being in the classpath is enough. I'm not sure there is a
> way to prevent a dependent module from loading.
> On Jan 6, 2011 3:54 AM, "Joel Halbert" <jo...@su3analytics.com> wrote:
>> As I understand it Tapestry-IOC will autoload any modules that it finds.
>>
>> http://tapestry.apache.org/autoloading-modules.html
>>
>>
>> Is there a way to explicitly disable the loading of certain modules,
>> other than removing the jar in which the module is packaged from the
>> classpath?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>

Re: tapestry ioc

Posted by Josh Canfield <jo...@gmail.com>.
>From the link; "Module autoloading isn't 100% free ... you must tell
Tapestry IoC where the modules to load are located, which can be done via a
Manifest file entry, or via an annotation."

I don't believe being in the classpath is enough. I'm not sure there is a
way to prevent a dependent module from loading.
On Jan 6, 2011 3:54 AM, "Joel Halbert" <jo...@su3analytics.com> wrote:
> As I understand it Tapestry-IOC will autoload any modules that it finds.
>
> http://tapestry.apache.org/autoloading-modules.html
>
>
> Is there a way to explicitly disable the loading of certain modules,
> other than removing the jar in which the module is packaged from the
> classpath?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>