[seam-issues] [JBoss JIRA] Commented: (SEAMINTL-7) Rewrite Messages API along the lines of JBoss Logging 3

Lincoln Baxter III (JIRA) jira-events at lists.jboss.org
Wed Nov 10 01:05:01 EST 2010


    [ https://jira.jboss.org/browse/SEAMINTL-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562395#action_12562395 ] 

Lincoln Baxter III commented on SEAMINTL-7:
-------------------------------------------

I think what you've got there is actually really good. I just worry that folks are going to think it's too verbose, so I think we need a very simple default, too. Or rather, a very simple approach to compliment it. One that doesn't require implementing an interface, annotating it, injecting the interface with a special wrapper + annotation, then calling get() in order to get the implemented interface proxy to display the message.

That's a lot of work. nice when it's done, yes, but I think we can provide an incremental approach to sort of let people get there if they want to. So, you can start out simple, then very easily "upgrade" to the strongly typed messages, etc.

For example:

I think the StatusReporter<?> interface should serve much like an Instance<?> wrapper, and should provide both the basic status message builder APIs, and also the strongly typed message APIs if the generic type is provided:

public class Example {

  @Inject StatusReporter basic;
  @Inject StatusReporter<RegistrationStatusReporter> status;
  @Inject RegistrationStatusReporter registration;

  public void method()
  {
    basic.info().targets("foo").message("This is a message built using a non-typed StatusReporter")
    status.info().message("This is a custom message that is not strongly typed, still available.");

    status.getTyped().userRegistered(user);

    registration.userRegistered(user);
  }

}

> Rewrite Messages API along the lines of JBoss Logging 3
> -------------------------------------------------------
>
>                 Key: SEAMINTL-7
>                 URL: https://jira.jboss.org/browse/SEAMINTL-7
>             Project: Seam i18n
>          Issue Type: Feature Request
>          Components: Messages
>    Affects Versions: 3.0.0.Alpha1
>            Reporter: Ken Finnigan
>            Assignee: Pete Muir
>             Fix For: 3.0.0.Beta1
>
>
> Rewrite messages API along the lines of JBoss Logging 3 to be consistent with the logging approach once the switch from slf4j is made to JBoss Logging 3.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list