Hi All,
I need to install the same application several times on orion - with a
different datasource for each instance. To do this I have created a
Data-Sources.XML in the application deplyment dir [as per email on the
list from Robert Krueger 6 Nov] which uses the
"com.evermind.sql.AliasDataSource" to point my app JNDI reference [which
is common to all 3 apps] to a specific datasource in the
\orion\config\data-sources.xml
Everything looks good - I get the app deployed 3 times - I get 3 Web
deployments - OrionConsole tells me the data-sources are all deployed in
the correct JNDI namespace.
BUT ...
Try and access any app and Orion wants to look up the Default datasource
- ie, the first one in the \Orion\Config\Data-Sources.XML.
Does anyone have any experience with deploying the same app several
times, needing different WAR and EJB deploys and different datasource
deploys?
Pls Help!
Neville Burnell
Business Manager Software
========================================================================
===========
This is what I have done so far:
1) installed 3 EARs in the \Orion\Applications\ dir - App1.EAR,
App2.EAR, App3.EAR
2) registered the 3 EARS with \Orion\Config\Server.XML
<application name="app1" path="../applications/app1.ear"
auto-start="true" />
<application name="app2" path="../applications/app2.ear"
auto-start="true" /><application name="app3"
path="../applications/app3.ear" auto-start="true" />
3) registered the 3 Apps with the \Orion\Config\Default-Web-Site.XML
<web-app application="app1" name="app-web" root="/app1" />
<web-app application="app2" name="app-web" root="/app2" />
<web-app application="app3" name="app-web" root="/app3" />
4) created 3 new datasources in \Orion\Config\Data-Sources.XML
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="com_bms1 (HSQL)"
location="jdbc/com_bms1_DS"
xa-location="jdbc/xa/com_bms1_XADS"
ejb-location="jdbc/com_bms1_EJBDS"
connection-driver="org.hsql.jdbcDriver"
username="sa"
password=""
url="jdbc:HypersonicSQL:/data/com_bms1/db/defaultdb"
inactivity-timeout="30"
/>
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="com_bms2 (HSQL)"
location="jdbc/com_bms2_DS"
xa-location="jdbc/xa/com_bms2_XADS"
ejb-location="jdbc/com_bms2_EJBDS"
connection-driver="org.hsql.jdbcDriver"
username="sa"
password=""
url="jdbc:HypersonicSQL:/data/com_bms2/db/defaultdb"
inactivity-timeout="30"
/>
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="com_bms3 (HSQL)"
location="jdbc/com_bms3_DS"
xa-location="jdbc/xa/com_bms3_XADS"
ejb-location="jdbc/com_bms3_EJBDS"
connection-driver="org.hsql.jdbcDriver"
username="sa"
password=""
url="jdbc:HypersonicSQL:/data/com_bms3/db/defaultdb"
inactivity-timeout="30"
/>
5) Start Orion to get deployment directories
6) Add a Data-Source.XML to each \Orion\Application-Deployments\App1\ to
map the EJB datasource to an Orion datasource via the
"com.evermind.sql.AliasDataSource"
<data-sources>
<data-source
class="com.evermind.sql.AliasDataSource"
location="jdbc/EOrdersDB"
source-location="jdbc/com_bms1_DS"
/>
</data-sources>
7) Update the \Orion\Application-Deployments\App1\Orion-Application.XML
to register the local datasource.xml
<data-sources path="./data-sources.xml" />
8) Shutdown & Restart Orion
9) Access http:\\localhost\app1 fails - Orion wants to access the
default DS....