At 11:45 06.11.00 , you wrote:
>Hello,
>
>I'm trying to setup different datasource locations for different
>applications, but can't get it to work for some reason. Can someone give me
>a clue?
>
>Orio does not complain when deploying. As far as I can understand the
>datasources.xml file in /config is ok (contains a tag for TestDS).
>
>Regards,
>Frank
frank,
i wouldn't use the default-datasource for that because that only writes the
appropriate stuff in your deployment files on first deployment (i.e.
location attribute for entities). IMHO it's best to use an
application-local data-sources.xml which uses datasource aliases to the
data-sources you specified in your global data-sources.xml.
here's a description I sent kurt:
here's some snippets from the configs.
server.xml:
<application name="procurement-devel"
path="/home/krueger/devel/projekte/s7procurement-deployment/devel"
deployment-directory="/home/krueger/devel/projekte/s7procurement-deployment/
devel/orion" />
here's the directory layout in the
/home/krueger/devel/projekte/s7procurement-deployment/devel/
./ejb/META-INF/ejb-jar.xml
./web/WEB-INF/web.xml
./orion/ejb/orion-ejb-jar.xml
./orion/procurement-web/orion-web.xml
./orion/data-sources.xml
./orion/orion-application.xml
./orion/principals.xml
./META-INF/application.xml
orion-application.xml:
<orion-application deployment-version="1.4.0" autocreate-tables="false">
<ejb-module remote="false" path="ejb" />
<web-module id="procurement-web" path="web" />
<persistence path="persistence" />
<principals path="principals.xml" />
<log>
<file path="log/application.log" />
</log>
<data-sources path="data-sources.xml" />
<namespace-access>
<read-access>
</read-access>
<write-access>
</write-access>
</namespace-access>
</orion-application>
data-sources.xml:
<data-sources>
<data-source class="com.evermind.sql.AliasDataSource"
location="jdbc/ShopEJBDS"
source-location="jdbc/ProcurementRefEJBDS" />
</data-sources>
where jdbc/ShopEJBDS is the location used in all the resource-ref-mappings
and entity-deployments
jdbc/ProcurementRefEJBDS is configured with driver url username password etc.
HTH
robert
>Here is my orion-application.xml file, which is generated by Orion. I only
>added the - default-data-source="jdbc/TestDS" - tag:
>
><?xml version="1.0"?>
><!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application
>runtime 1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd">
>
><orion-application deployment-version="1.2.9"
>default-data-source="jdbc/TestDS">
> <ejb-module remote="false" path="usermanager" />
> <ejb-module remote="false" path="cart" />
> <client-module path="cart" deployment-time="e1c157d340"
> auto-start="false"
>/>
> <persistence path="persistence" />
> <principals path="principals.xml" />
> <log>
> <file path="application.log" />
> </log>
> <namespace-access>
> <read-access>
> <namespace-resource root="">
> <security-role-mapping>
> <group name="administrators" />
> </security-role-mapping>
> </namespace-resource>
> </read-access>
> <write-access>
> <namespace-resource root="">
> <security-role-mapping>
> <group name="administrators" />
> </security-role-mapping>
> </namespace-resource>
> </write-access>
> </namespace-access>
></orion-application>
(-) 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