You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2009/01/20 15:41:59 UTC

[jira] Created: (SM-1771) Support JarUrlConnection with regexp in the SU

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.


[jira] Updated: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SM-1771:
-------------------------------------

    Attachment: SM-1771-4.patch

This is the first real patch release.

It includes the support of :
- file: based URL
- jar:file: based URL
- jar:file: based URL with regexp support.

Guillaume, could make a quick review on the patch and give me some feedback ?

Thanks,
Regards
JB

> 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é
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch
>
>
> 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.


[jira] Commented: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49840#action_49840 ] 

Jean-Baptiste Onofré commented on SMXCOMP-176:
----------------------------------------------

I'm going to extend the patch to be able to use system properties.

Has we have the servicemix.home argument in the SMX startup (provided using -Dservicemix.home=), it can be interesting to use this property in the <location/> definition.

With it, we will be able to use notation like :
<classpath>
 <location>${servicemix.home}/lib/ext/myjar.jar</location>
</classpath>

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch
>
>
> 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.


[jira] Updated: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SMXCOMP-176:
-----------------------------------------

    Attachment: SMXCOMP-176_4.patch

Patch containing the last Guillaume's comment.

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch, SMXCOMP-176_3.patch, SMXCOMP-176_4.patch
>
>
> 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.


[jira] Commented: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50148#action_50148 ] 

Guillaume Nodet commented on SMXCOMP-176:
-----------------------------------------

Two comments:
  * I think the file:// pattern could be used with regexp too (imho this is a valid use case)
  * I would avoid using a JarFile and use a JarInputStream instead, this would make all jar:xxx urls work and not only jar:file:xxx urls

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch, SMXCOMP-176_3.patch
>
>
> 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.


[jira] Commented: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48911#action_48911 ] 

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

I have seen that getResource(String location) method is used to load a classpath.xml file (in the SU root) too.
This classpath.xml must be remain a File. So, I will make a little patch of the preprocess() method to let the classpath.xml as a File.

> 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.


[jira] Commented: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49851#action_49851 ] 

Jean-Baptiste Onofré commented on SMXCOMP-176:
----------------------------------------------

The last patch contains only the change on the unit test. We need to apply both SMXCOMP-176_1 and SMXCOMP-176_2 patches (in this order).

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch
>
>
> 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.


[jira] Commented: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SM-1771:
-------------------------------------

    Attachment: SM-1771-2.patch

A new patch that use ZipFile/ZipEntry to use regexp and generate the matching URL.

Warning : this patch is work in progress (unit test fails). I need to work on it and so it's not intended for inclusion.

> 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é
>         Attachments: SM-1771-1.patch, SM-1771-2.patch
>
>
> 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.


[jira] Commented: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48839#action_48839 ] 

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

For information, the <classpath/> management class is in servicemix-common. It's the ClassLoaderXmlPreprocessor.

> 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.


[jira] Commented: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49482#action_49482 ] 

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

After dealing with Guillaume, the getResource() method should now return a list of URL.
Currently the getJarResource() supports regexp but returns only the first occurence that match. A more efficient way is to return the list of all URLs matching the regexp.

> 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é
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch
>
>
> 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.


[jira] Resolved: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved SMXCOMP-176.
------------------------------------------

    Resolution: Fixed

Patch commited. It will be included in the next SMX3 release.

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch, SMXCOMP-176_3.patch, SMXCOMP-176_4.patch
>
>
> 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.


[jira] Updated: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SM-1771:
-------------------------------------

    Attachment: SM-1771-3.patch

Correct the issue. Now parse the URI using StringBuffer/String. Get the ZipFile and looking into entries.
Add unit test with a ear file.
Need to complete with new unit tests.

> 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é
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch
>
>
> 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.


[jira] Work started: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on SM-1771 started by Jean-Baptiste Onofré.

> 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é
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch
>
>
> 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.


[jira] Updated: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SMXCOMP-176:
-----------------------------------------

    Attachment: SMXCOMP-176_3.patch

Here is the complete patch with the commented part of the unit test.

I build SMX3 using this to perform "real" tests.

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch, SMXCOMP-176_3.patch
>
>
> 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.


[jira] Updated: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SM-1771:
-------------------------------------

    Attachment: SM-1771-1.patch

Step 1 : add the support of jar: and file: classpath entries.

The path contains the getResource() changes in the ClassLoaderXmlPreprocessor and a small unit test for different kind of provided URLs.

The patch root is servicemix-core.

I resume to better support (and try the regexp support as made in Commons VFS).

> 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é
>         Attachments: SM-1771-1.patch
>
>
> 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.


[jira] Updated: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SMXCOMP-176:
-----------------------------------------

    Attachment: SMXCOMP-176_1.patch

This patch contains :
- renaming of the methods
- adding replace method
- use system properties to replace value in location

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch
>
>
> 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.


[jira] Commented: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50817#action_50817 ] 

Jean-Baptiste Onofré commented on SMXCOMP-176:
----------------------------------------------

Another tip from Guillaume, the replaceString method can be replaced by :

        for (Enumeration e = properties.propertyNames(); e.hasMoreElements();) {
            String key = (String)e.nextElement();
            String val = properties.getProperty(key);
            Matcher matcher = Pattern.compile("\\$\\{([^}]+)\\}").matcher(val);
            while (matcher.find()) {
                String rep = System.getProperty(matcher.group(1));
                if (rep != null) {
                    val = val.replace(matcher.group(0), rep);
                    matcher.reset(val);
                }
            }
            properties.put(key, val);


> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch, SMXCOMP-176_3.patch, SMXCOMP-176_4.patch
>
>
> 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.


[jira] Updated: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SMXCOMP-176:
-----------------------------------------

    Attachment: SMXCOMP-176_2.patch

To avoid unit test failure after applying the patch (as the test.ear file shouldn't be created using the patch file), I have commented the unit test assert around the ear exploring.

This patch should be the final one. I build a complete SMX3 distribution and make "real" tests.

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch
>
>
> 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.


[jira] Updated: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SMXCOMP-176:
-----------------------------------------

    Attachment: SMXCOMP-176.patch

This patch now supports multi URLs.

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch
>
>
> 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.


[jira] Commented: (SMXCOMP-176) Support JarUrlConnection with regexp in the SU

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SMXCOMP-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50754#action_50754 ] 

Jean-Baptiste Onofré commented on SMXCOMP-176:
----------------------------------------------

Thanks for your comment Guillaume, I will submit a new patch including this.

> Support JarUrlConnection with regexp in the SU <classpath/>
> -----------------------------------------------------------
>
>                 Key: SMXCOMP-176
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-176
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-common
>    Affects Versions: 3.2.3
>         Environment: ServiceMix 3.3.1
> JVM 1.5.0 Sun
> Linux
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>         Attachments: SM-1771-1.patch, SM-1771-2.patch, SM-1771-3.patch, SM-1771-4.patch, SMXCOMP-176.patch, SMXCOMP-176_1.patch, SMXCOMP-176_2.patch, SMXCOMP-176_3.patch
>
>
> 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.


[jira] Commented: (SM-1771) Support JarUrlConnection with regexp in the SU

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48842#action_48842 ] 

Guillaume Nodet commented on SM-1771:
-------------------------------------

Not sure how feasible it is to use regexp on non file based urls.

> 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.