At 11:00 15.12.00 , you wrote:
>I have had the same problem tending to make me doubt the Krueger post.  My

:-(((. I trold the whole truth and nothing but the truth, please believe 
me! ;-)))

I've been using the datasource-alias feature for more than 2 months now 
without any problem. could it be that you still have a reference to 
data-sources.xml in your server.xml file (i.e. according to the old dtds)? 
I know that we had strange effects migrating from the old dtds t othe new 
ones because the old ones still worked but when mixing this stufff we got 
strange side effects. Where do you declare the global data-sources.xml? it 
should be in global-application.xml and NOT in server.xml. it looks like 
the application local data-sources.xml is being ignored completely. other 
than that I don't know what could be wrong with your setup. I've use this 
feature in several different applications without any problem and it makes 
life so much easier, because we deploy a shop application for a new 
customer just by modifying the data-source alias in the application-local 
data-sources.xml file.

here's my setup again and maybe you could post the same snippets from your 
configs so we can work this out:

server.xml:

      <global-application name="default" path="./global-application.xml" />

global-application.xml:

     <data-sources path="./data-sources.xml" />

data-sources.xml:

         <data-source
                      name="Procurement Ref Datasource"
                      class="com.evermind.sql.ConnectionDataSource"
                      location="jdbc/ProcurementRefDS"
                      xa-location="jdbc/xa/ProcurementRefXADS"
                      ejb-location="jdbc/ProcurementRefEJBDS"
                      url="jdbc:oracle:thin:@XXX:1521:S701A"
                      connection-driver="oracle.jdbc.driver.OracleDriver"
                      schema="database-schemas/oracle.xml"
                      username="XXX"
                      password="XXX"
                      inactivity-timeout="30"
                      />


orion-application.xml (located in the application's deployment directory):

         <data-sources path="data-sources.xml" />

(in the application-local) data-sources.xml:

<data-source class="com.evermind.sql.AliasDataSource"
              location="jdbc/ShopEJBDS"
              source-location="jdbc/ProcurementRefEJBDS" />

and finally in orion-ejb-jar.xml:

<entity-deployment name="Company" location="Company" 
wrapper="CompanyHome_EntityHomeWrapper276" table="COMPANY" 
data-source="jdbc/ShopEJBDS">

this works like a charm for 15 deployments fo the same application. now, 
what is different in your setup?

regards,

robert







>solution is to have a data-sources.xml for each datasource and rotate them by
>hand before I launch Orion.  I know this is not correct but its the only way I
>have found to do this ... could someone please help.
>
>john
>
>On 14-Dec-00 Neville Burnell wrote:
> > 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....
> >
>
>----------------------------------
>E-Mail: John N. Alegre <[EMAIL PROTECTED]>
>Date: 15-Dec-00
>Time: 10:58:59
>
>This message was sent by XFMail
>----------------------------------

(-) Robert Kr�ger
(-) SIGNAL 7 Gesellschaft f�r Informationstechnologie mbH
(-) Br�der-Knau�-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de


Reply via email to