[ 
https://issues.apache.org/jira/browse/CONNECTORS-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16888406#comment-16888406
 ] 

Karl Wright commented on CONNECTORS-1566:
-----------------------------------------

[~schuch], what does "from the classpath" mean??
My concern is that the resource loading uses the right ClassLoader.  The right 
ClassLoader in this case is the one that loaded the actual connector class.  
Java has primitives for loading resources from either a Class:
{code}
URL     Class.getResource(String name)
{code}
Finds a resource with a given name.
{code}
InputStream     Class.getResourceAsStream(String name)
{code}
Finds a resource with a given name.

... or from a Thread:

{code}
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
InputStream is = classloader.getResourceAsStream("test.csv");
{code}

The problem is I have no control over what technique is used to locate the 
resources.  Connector classes run in the connector-lib classloader; this is a 
level down from the root classloader.  The class that looks up the resource is 
in one of the jax jars which runs at the root level, so it's impossible for it 
to locate any resources at the connector-lib level unless it takes either a 
Class or a ClassLoader as an argument, and it does not.


> Develop CSWS connector as a replacement for deprecated LiveLink LAPI connector
> ------------------------------------------------------------------------------
>
>                 Key: CONNECTORS-1566
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1566
>             Project: ManifoldCF
>          Issue Type: Task
>          Components: LiveLink connector
>    Affects Versions: ManifoldCF 2.12
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>            Priority: Major
>             Fix For: ManifoldCF 2.14
>
>         Attachments: OTCS_IIS.png, OTCS_Tomcat.png, chrome_cgfC00ujx7.png
>
>
> LAPI is being deprecated.  We need to develop a replacement for it using the 
> ContentServer Web Services API.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to