[weld-issues] [JBoss JIRA] Commented: (WELD-836) WELD should try to resolve injection points in webapp's jar files

Krzysztof Maslak (JIRA) jira-events at lists.jboss.org
Mon Jan 24 00:35:50 EST 2011


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

Krzysztof Maslak commented on WELD-836:
---------------------------------------

Yes, you are right, the existing logic should handle this situation :) . 
I have beans.xml placed in my jars and they are being picked up, but the scanning does not occur.
What happens is that it returns me correctly URLs. Then 'handle' method tries to process file or directory, but the file with the given path doesn't exist.
I was not following jboss neither weld before, so I can be wrong. 
I think that the problem might be that, those are virtual files and using getFile on them to get the path and then using this path with java.io.File creates this problem as those files are not there.   
This method is used along the road
URL VFSUtils.getVirtualURL(VirtualFile file)
and this is part of javadoc for this method:
     * Get the virtual URL for a virtual file.  This URL can be used to access the virtual file; however, taking the file
     * part of the URL and attempting to use it with the {@link java.io.File} class may fail if the file is not present
     * on the physical filesystem, and in general should not be attempted.

> WELD should try to resolve injection points in webapp's jar files
> -----------------------------------------------------------------
>
>                 Key: WELD-836
>                 URL: https://issues.jboss.org/browse/WELD-836
>             Project: Weld
>          Issue Type: Feature Request
>            Reporter: Krzysztof Maslak
>         Attachments: WEB-INF_lib__jar_scanner.patch
>
>
> Having following example scenario:
> webapp.war
>    - /WEB-INF/lib/jar-with-some-nice-business-logic.jar - contains some injection points ( i.e. ICacheManager ) and using DefaultBean shipped with SeamSolder a default implementation ( as the injection points have to be satisfied )
>    - /WEB-INF/lib/caching-solution-provider.jar - provides CacheManagerImpl
>  
> Having this simple example I would like to have this injection point satisfied by this caching-solution-provider.jar. With such solution I would be able to change my caching-solution-provider.jar without any code modification just by changing dependency in pom.xml for another cache provider which would be able to satisfy my contract. 
> Then my development process would be similar to development in OSGi and blueprint as DI provider. I would care only about fulfilling the contracts by various artefacts.

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

        


More information about the weld-issues mailing list