Skip to content

Commit

Permalink
MONDRIAN: Fixes compile error introduced after some modifications to …
Browse files Browse the repository at this point in the history
…the XMLA driver. The proxy interface now gets an XmlaServerInfos object rather than a URL.

[git-p4: depot-paths = "//open/mondrian/": change = 14183]
  • Loading branch information
lucboudreau committed Mar 30, 2011
1 parent 8a36f75 commit 2691c1f
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions testsrc/main/mondrian/olap4j/MondrianInprocProxy.java
Expand Up @@ -2,22 +2,19 @@
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2008-2010 Julian Hyde
// Copyright (C) 2008-2011 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
package mondrian.olap4j;

import org.xml.sax.SAXException;
import org.olap4j.driver.xmla.XmlaOlap4jServerInfos;
import org.olap4j.driver.xmla.proxy.XmlaOlap4jProxy;

import javax.servlet.Servlet;
import javax.servlet.ServletException;
import java.lang.ref.WeakReference;
import java.util.concurrent.*;
import java.util.*;
import java.net.URL;
import java.io.IOException;

import mondrian.tui.XmlaSupport;

Expand Down Expand Up @@ -69,27 +66,27 @@ public Thread newThread(Runnable r) {
}
);

public byte[] get(URL url, String request) throws IOException {
public byte[] get(
XmlaOlap4jServerInfos infos,
String request)
{
try {
return XmlaSupport.processSoapXmla(
request, urlString, catalogNameUrls, null, null, servletCache);
} catch (ServletException e) {
throw new RuntimeException(
"Error while reading '" + url + "'", e);
} catch (SAXException e) {
} catch (Exception e) {
throw new RuntimeException(
"Error while reading '" + url + "'", e);
"Error while reading '" + infos.getUrl() + "'", e);
}
}

public Future<byte[]> submit(
final URL url,
final XmlaOlap4jServerInfos infos,
final String request)
{
return singleThreadExecutor.submit(
new Callable<byte[]>() {
public byte[] call() throws Exception {
return get(url, request);
return get(infos, request);
}
}
);
Expand Down

0 comments on commit 2691c1f

Please sign in to comment.