Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] Many services on one Tomcat

Subject: perfsonar development work

List archive

Re: [pS-dev] Many services on one Tomcat


Chronological Thread 
  • From: Loukik Kudarimoti <>
  • To: Roman Lapacz <>
  • Cc:
  • Subject: Re: [pS-dev] Many services on one Tomcat
  • Date: Fri, 08 Sep 2006 10:56:08 +0100

Hi Roman,

Roman Lapacz wrote:
Loukik Kudarimoti wrote:
Hi Guys,

I now have a solution to this problem. We no longer have to deal with adding properties into catalina.properties file (one step less during installation and one less restart)

I have tested the solution and will put up sources and an email detailing it soon. The only substantial work required is in deploying our service. We will be required to create a separate directory under tomcat/webapps (for example: tomcat/webapps/RRDMA) and copy our jars into that directory.

I understand that for each pS service you want to have a separate axis (so axis will have only one web service)

Yes, something like this:

/home/loukik/tomcat/webapps/ps-MA-RRD-1.0 (this is from perfSONAR 1.0 suite)
/home/loukik/tomcat/webapps/ps-LS-XML-1.0 (this is also from perfSONAR 1.0 suite)
/home/loukik/tomcat/webapps/ps-MA-SQL-s01092006 (this is a snapshot)
/home/loukik/tomcat/webapps/ps-MP-SNMP-s01062006 (this is also a snapshot)

(Also notice the above naming convention. I think it will be helpful to follow a rational naming convention)

We won't have axis in webapps. Instead we need to copy axis.jar (the correct version) along with a couple of other jars (exact list will follow) to the WEB-INF/lib directory of each of the above directories.

We will also need to provide axis like validation pages. This is quite straightforward. Check out (http://mu.dante.org.uk:9013/Test/). In the above directory, I have installed a dummy Measurement Archive Service which accepts a request, finds out if it can load service.properties and catalina.properties. If so, it returns the request back else throws an exception.

So, the URLs for our services listed above will be:

http://mu.dante.org.uk:9013/ps-MA-RRD-1.0/services/MeasurementArchiveService
http://mu.dante.org.uk:9013/ps-LS-XML-1.0/services/LookupService
http://mu.dante.org.uk:9013/ps-MA-SQL-s01092006/services/MeasurementArchiveService
http://mu.dante.org.uk:9013/ps-MP-SNMP-s01062006/services/MeasurementPointService

(if the user wants to change the url above, he only needs to rename the webapps directory)

This scheme allows a single tomcat instance to be used for any number of services. Also, if somebody wants to install perfsonar suite of services and at the same time a more recent snapshot, it can be done without conflict in the same tomcat.

As you mentioned, service.properties and catalina.properties will be treated as resources.

They will be present as listed below:

For /home/loukik/tomcat/webapps/ps-MA-RRD-1.0/WEB-INF/

/home/loukik/tomcat/webapps/ps-MA-RRD-1.0/WEB-INF/classes/perfsonar/conf/service.properties
/home/loukik/tomcat/webapps/ps-MA-RRD-1.0/WEB-INF/classes/perfsonar/conf/components.properties

Similarly for each service installations.

We no longer need to put properties in catalina.properties and we no longer require the user to restart the tomcat after modifying catalina.properties. If the user makes any changes to any of the resources, tomcat will need to be restarted but I think this is only because we keep all the properties in service.properties and catalina.properties in memory in order to improve efficiency. Otherwise, there wouldn't have been any need to restart.

I have the code ready for the property reader and auxiliarycomponent manager. I plan to check it in today.

Loukik

and probably you want to put config file(s) under WEB-INF/classes/ and have an access to it as a resource.


Roman




More on it soon.

Loukik.







Archive powered by MHonArc 2.6.16.

Top of Page