[seam-issues] [JBoss JIRA] Commented: (SEAMSOCIAL-10) Create service Bean when needed (configuration is available)

Antoine Sabot-Durand (JIRA) jira-events at lists.jboss.org
Fri May 6 09:31:18 EDT 2011


    [ https://issues.jboss.org/browse/SEAMSOCIAL-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600351#comment-12600351 ] 

Antoine Sabot-Durand commented on SEAMSOCIAL-10:
------------------------------------------------

I was thinking of the "Hootsuite" or "Seesmic" use case where user would ask for the creation of a connection to a given social service within the application.

I think I missed the "if it's not injected it's not created" as my example app use an @Any injection point on an Instance<>. But the way I designed it is wrong because, if the container doesn't create the bean, it checks dependency at start time and as I created a OAuthSettings bean with a qualifier for each service that is injected in the service bean, I need to configure those settings even for services I don't need.

I thought about splitting services in different modules but I was not sure it would fit in global Seam best practices design.

Anyway, thanks Marek for your comment : I feel less alone and it helps me a lot.

> Create service Bean when needed (configuration is available)
> ------------------------------------------------------------
>
>                 Key: SEAMSOCIAL-10
>                 URL: https://issues.jboss.org/browse/SEAMSOCIAL-10
>             Project: Seam Social
>          Issue Type: Enhancement
>          Components: OAuth Core
>    Affects Versions: 3.0.0.Alpha1
>            Reporter: Antoine Sabot-Durand
>            Assignee: Antoine Sabot-Durand
>            Priority: Minor
>   Original Estimate: 1 week, 1 day
>  Remaining Estimate: 1 week, 1 day
>
> Right now each, each Service bean is created at application start. If there is no configuration for the bean an dependency exception is thrown. 
>  * Services should be created at startup only if configuration is available at application level : source code or Config file
>  *  We should be able to create service dynamically at run time.
>  
>  So perhaps OAuthServices should be created by producers.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list