[ 
https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48910#action_48910
 ] 

Jean-Baptiste Onofré commented on SM-1771:
------------------------------------------

Well, I have seen the <location/> usage in the 
getClassLoader(SpringApplicationContext applicationContext, 
XmlBeanDefinitionReader reader, Document document) method.

For the <location/>, a classpath List is created and populated with location 
element. After that, this classpath List is transformed into a URLs array.
This transformation is made using getResource(String location) method.
The issue is that in getResource(String location), a File is used :

URI uri = root.toURI().resolve(location); // where root is a File provided in 
the constructor
File file = new File(uri);

I'm going to patch the getResource(String location) method to detect if the 
location is a JarUrlConnection or a File and return a URL.
I think that I can take the location string and apply some regexp on it (I need 
to investigate deeper).




> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SM-1771
>                 URL: https://issues.apache.org/activemq/browse/SM-1771
>             Project: ServiceMix
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>
> It's possible to extend the SU classloader using the <classpath/> tag.
> Currently, the <location/> tag in classpath uses File and expects something 
> like /path/to/my.jar.
> We are going to extend this using JarUrlConnection inside the <location/> 
> tag. Using JarUrlConnection, the user will be able to use classpath extension 
> like :
> jar:file:/path/to/my.ear!/my.jar
> for example.
> Moreover, we will add regexp supports for jar lookup. At the end, the user 
> will be able to use something like that :
> jar:file/path/to/my.ear!/my*.jar

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to