« Return to Thread: [jira] Created: (CARGO-584) Discover implementations at runtime

[jira] Commented: (CARGO-584) Discover implementations at runtime

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View in Thread


    [ http://jira.codehaus.org/browse/CARGO-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=141104#action_141104 ]

Kohsuke Kawaguchi commented on CARGO-584:
-----------------------------------------

This is an useful feature, but there are several issues with this.

First, this only works when you use cargo-maven2-plugin, but the maven plugin is just one of the offerings.

Second, it violates the DRY principle. When the user added additional container implementation through <dependency> in the plugin configuration, that should be a signal enough for Cargo. The users shouldn't be asked to put lengthy information like this.

The point of factory is so that users won't need to worry about the actual implementation class names. If they need to hard-code it, they must just as well call the {{new FooContainer()}} themselves.

> Discover implementations at runtime
> -----------------------------------
>
>                 Key: CARGO-584
>                 URL: http://jira.codehaus.org/browse/CARGO-584
>             Project: Cargo
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.9
>            Reporter: Kohsuke Kawaguchi
>
> As it stands right now, Cargo DefaultXXXFactory only knows about implementations that are hard-coded in them. This makes it unnecessarily hard for people (like me) to develop container implementations. I can't provide the same level of usability to users unless I get into the core.
> But this needs not be the case. We should use the standard META-INF/services look up to discover implementations at runtime.
> In this way, there's an easier path for additional container implementations --- they can start on their own outside Cargo, be proven usable, and then gradually get into the Cargo project itself if that makes sense. If for whatever reasons it needs to stay outside the main Cargo project, that can work, too.
> I'm willing to provide a patch for this change if the developers are OK with the direction.

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

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: [jira] Created: (CARGO-584) Discover implementations at runtime

LightInTheBox - Buy quality products at wholesale price!