Skip to content
Snippets Groups Projects
Commit 3cddb363 authored by cramakri's avatar cramakri
Browse files

LMS-1502 Moved the RPC services for the data store server back behind the...

LMS-1502 Moved the RPC services for the data store server back behind the data_store path in the URL.

SVN: 16289
parent a633c3a0
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,6 @@ import ch.systemsx.cisd.common.exceptions.InvalidSessionException;
import ch.systemsx.cisd.common.io.ConcatenatedFileInputStream;
import ch.systemsx.cisd.openbis.dss.client.api.v1.IDataSetDss;
import ch.systemsx.cisd.openbis.dss.client.api.v1.IDssComponent;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.DataStoreApiUrlUtilities;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.FileInfoDssDTO;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.NewDataSetDTO;
......@@ -435,7 +434,7 @@ class AuthenticatedState extends AbstractDssComponentState
*/
private String getDataStoreUrlFromDataStore(DataStore dataStore)
{
return DataStoreApiUrlUtilities.getDataStoreUrlFromDataStore(dataStore);
return dataStore.getDownloadUrl();
}
@Override
......
......@@ -200,9 +200,9 @@ public class DataStoreServer
/**
* Initialize RPC service interfaces
*/
// TODO: The registration process here needs to be made cleaner -- perhaps by using Spring and
// the dssApplicationContext.xml more effectively, or perhaps by using annotations and
// reflection.
// TODO 2010-06-01, CR : The registration process here needs to be made cleaner.
// Perhaps by using Spring and the dssApplicationContext.xml more effectively, or perhaps by
// using annotations and reflection.
private static void initializeRpcServices(final Context context,
final ApplicationContext applicationContext, final ConfigParameters configParameters)
{
......@@ -214,14 +214,24 @@ public class DataStoreServer
// Export the spring bean to the world by wrapping it in an HttpInvokerServlet
String rpcV1Suffix = "/rmi-dss-api-v1";
String rpcV1Path = rpcV1Suffix;
String rpcV1Path = "/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME + rpcV1Suffix;
context.addServlet(new ServletHolder(new HttpInvokerServlet(v1ServiceExporter, rpcV1Path)),
rpcV1Path);
// Inform the name server about the services I export
// N.b. In the future, this could be done using spring instead of programmatically
HttpInvokerServiceExporter nameServiceExporter =
ServiceProvider.getRpcNameServiceExporter();
String nameServerPath =
"/" + DATA_STORE_SERVER_WEB_APPLICATION_NAME
+ IRpcServiceNameServer.PREFFERED_URL_SUFFIX;
context.addServlet(new ServletHolder(new HttpInvokerServlet(nameServiceExporter,
nameServerPath)), nameServerPath);
RpcServiceInterfaceVersionDTO nameServerVersion =
new RpcServiceInterfaceVersionDTO(IRpcServiceNameServer.PREFFERED_SERVICE_NAME,
IRpcServiceNameServer.PREFFERED_URL_SUFFIX, 1, 0);
// Inform the name server about the services I export
// N.b. In the future, this could be done using spring instead of programmatically
RpcServiceNameServer rpcNameServer =
(RpcServiceNameServer) nameServiceExporter.getService();
......@@ -229,17 +239,7 @@ public class DataStoreServer
new RpcServiceInterfaceVersionDTO(DssServiceRpcGeneric.DSS_SERVICE_NAME,
rpcV1Suffix, 1, 0);
rpcNameServer.addSupportedInterfaceVersion(v1Interface);
String nameServerPath = IRpcServiceNameServer.PREFFERED_URL_SUFFIX;
RpcServiceInterfaceVersionDTO nameServerVersion =
new RpcServiceInterfaceVersionDTO(IRpcServiceNameServer.PREFFERED_SERVICE_NAME,
IRpcServiceNameServer.PREFFERED_URL_SUFFIX, 1, 0);
rpcNameServer.addSupportedInterfaceVersion(nameServerVersion);
context.addServlet(new ServletHolder(new HttpInvokerServlet(nameServiceExporter,
nameServerPath)), nameServerPath);
}
private static void registerPluginServlets(Context context, List<PluginServlet> pluginServlets)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment