On Mon, 28 Jan 2013 09:58:07 -0200, Segura <segur...@yandex.ru> wrote:
@Contribute(WebSecurityManager.class)
public static void addRealms(Configuration<Realm> configuration) {
AccountRealmImpl realm = new AccountRealmImpl();
configuration.add(realm);
}
It doesn't make any sense to to instantiate AccountRealmImpl directly if
it's was configured as a service already. Do this instead:
@Contribute(WebSecurityManager.class)
public static void addRealms(Configuration<Realm> configuration,
AccountRealm realm) {
configuration.add(realm);
}
This probably wasn't the source of your problem, but at least your code
will be better written.
but code
@Inject
private AccountRealm realm;
void onActivate() {
realm.addAccount("User", "123");
}
throws "No service implements the interface java.lang.String". Whats
wrong in my code?
Full stack trace please. I don't think this error is related to code
above. It seems you put @Inject in a String field.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org