I didn't think about SubModule... so I just added the line before AppModule
class declaration this :

@SubModule({UserModule.*class*})
*public* *class* *AppModule* {

And that's it, my UserModule is loaded and the build is normally called.
Thanks a lot!


2007/6/1, Kristian Marinkovic <[EMAIL PROTECTED]>:

if you look at the code in TapestryAppInitializer you'll
see that only ONE module is loaded automatically. Tapestry
"guesses" the module class by using the filter name as a prefix
and "Module" as a  postfix

public TapestryAppInitializer(SymbolProvider appProvider, String appName,
String aliasMode)
    ...
        String className = _appPackage + ".services." +
InternalUtils.capitalize(_appName)
                + "Module";
    ...
        Class moduleClass =
Thread.currentThread().getContextClassLoader().loadClass(className);

        _builder.add(moduleClass);




Kristian Marinkovic < [EMAIL PROTECTED]>
01.06.2007 11:26
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org >


An
"Tapestry users" <users@tapestry.apache.org>
Kopie

Thema
Re: T5 - Service injection and ioc






i assume you have used the tapestry archetype.... :)

with the SubModule annotation you can have other module classes
loaded with the AppModule without putting them into the manifest.

as an alternative you can put your module into your manifest as
well (comma separated)

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Tapestry-Module-Classes>

com.poi.tapestry5.ioc.test.module.AppModule,
com.poi.tapestry5.ioc.test.module.MyModule


              </Tapestry-Module-Classes>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

Tapestry-Module-Classes: com.poi.tapestry5.ioc.test.module.AppModule,
com.poi.tapestry5.ioc.test.module.MyModule






Blackwings <[EMAIL PROTECTED]>
01.06.2007 11:14
Bitte antworten an
"Tapestry users" < users@tapestry.apache.org>


An
"Tapestry users" <users@tapestry.apache.org>
Kopie

Thema
Re: T5 - Service injection and ioc






/cry...
Does Howard confirm this?

2007/6/1, Joshua Jackson <[EMAIL PROTECTED]>:
>
> I think you can only have one Module loaded by Filter (CMIIW). Last
> time I tried I only can load AppModule, and the other Module entries
> are ignored.
>
> On 6/1/07, Blackwings <[EMAIL PROTECTED]> wrote:
> > So, I created my own Module in the same package than AppModule,
> following
> > the naming convention :
> >
> > public final class UserModule {
> >  public UserService buildUserService() {
> >    return new UserServiceImpl();
> >  }
> > }
> >
> > And I still have the error, the same others have, "No service
implements
> the
> > interface papo.ioc.services.UserService ."
> >
> > So, how can I declare the Module? :)
> >
> > 2007/6/1, Joshua Jackson <[EMAIL PROTECTED]>:
> > >
> > > Of course you can create your own Module, but AppModule it the ones
> > > automatically loaded because it is configured in your web.xml
> > >
> > > On 6/1/07, Blackwings <[EMAIL PROTECTED]> wrote:
> > > > Still the same question... Are we force to use only the AppModule?
> Can
> > > we
> > > > create our own module? This is the question. I think we know how
to
> > > > implement, inject and create a Service.
> > > > I achieved to make it works only when finally I declared my
service
> > > builder
> > > > in AppModule but we still don't know how to create our own hand
made
> > > Module.
> > >
> > > --
> > > YM!: thejavafreak
> > > Blog: http://www.nagasakti.or.id/roller/joshua/
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Michael Bernagou
> > Java Developper
> >
>
>
> --
> YM!: thejavafreak
> Blog: http://www.nagasakti.or.id/roller/joshua/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Michael Bernagou
Java Developper





--
Michael Bernagou
Java Developper

Reply via email to