pbakker wrote:- Don't share the same properties file between two instances (an instance being Servoy server or Servoy Developer)
- Make sure you configure different ports for all instances (or disable HTTP Services in Developer instances)
- When each environment uses their own databases: Make sure they run on different ports and you connect to the proper one.
...
Paul
Hi Paul, I've followed the instructions in the Servoy Server manual. What i did was duplicate the entire Servoy folder, changed the ports in server.xml for one instance, changed the RMI settings in Properties. If I run both at once, it always connects to the first opened database (eg MyData.db, which exists in both Servoy and Copy of Servoy folders), as there is only a single ASA Anywhere server running.
Here's the first server.xml (and RMI set to 1098)
- Code: Select all
<Server port="8005" shutdown="SHUTDOWN_NOW">
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" minProcessors="1" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" connectionTimeout="60000"/>
<!-- Note : To disable connection timeouts, set connectionTimeout value to -1 -->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- Because this Realm is here, an instance will be shared globally -->
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<!-- Define the default virtual host -->
<Host name="localhost" appBase="webapps" unpackWARs="true">
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common"/>
<Context path="/lib" docBase="../../lib"/>
<Context path="/plugins" docBase="../../plugins"/>
<Context path="/beans" docBase="../../beans"/>
<Context path="/lafs" docBase="../../lafs"/>
</Host>
</Engine>
</Service>
</Server>
and here's the other (and RMI set to 1099)
- Code: Select all
<Server port="9005" shutdown="SHUTDOWN_NOW">
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Catalina">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8081 -->
<Connector port="8081" minProcessors="1" maxProcessors="75"
enableLookups="true" redirectPort="9443"
acceptCount="10" connectionTimeout="60000"/>
<!-- Note : To disable connection timeouts, set connectionTimeout value to -1 -->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="localhost">
<!-- Because this Realm is here, an instance will be shared globally -->
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<!-- Define the default virtual host -->
<Host name="localhost" appBase="webapps" unpackWARs="true">
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common"/>
<Context path="/lib" docBase="../../lib"/>
<Context path="/plugins" docBase="../../plugins"/>
<Context path="/beans" docBase="../../beans"/>
<Context path="/lafs" docBase="../../lafs"/>
</Host>
</Engine>
</Service>
</Server>
How should I make sure DBs run on different ports and I'm connecting to the proper one?
Thanks for the help.