At 17:09 31.10.00 , you wrote:
>Hiya,
>
>Ok. Built Entity bean. Deployed in jar. After some fiddling that is. My
>situation is this; I have four environments. A "dev", "test", "stage" and
<snip/>
in short: what you really want is not possible. you cannot dynamically
associate a cmp entity with a datasource. I know the problem with the dev,
staging, test etc. environments and your best bet IMHO is to simply deploy
the entire application once for each datasource which is really just
copying your deployment directory structure. one more thing that comes in
handy here is the datasource-alias feature (undocumented) which allows you
to map a datasource name to another one (yet another level of indirection)
thereby giving you the possibility to change the datasource of your app
with only one change in the deployment files (i.e. in the application local
data-sources.xml).
taken from an application local data-sources.xml file:
<data-source class="com.evermind.sql.AliasDataSource"
location="jdbc/ShopEJBDS"
source-location="jdbc/ProcurementRefEJBDS" />
</data-sources>
the fact that you find your default datasource in orion-ejb-jar.xml upon
first deployment is not a bug. you can redefine the default datasource for
that app and it will be put there (and by definition doesn't have anything
to do with what you do to ejb-jar.xml).
you'll do yourself a favour if you keep reading up on this stuff as some of
your comments indicate that you haven't entirely understood the separation
of the different roles (manifested in the responsibilities of the different
config files) in J2EE (which is not surprising after only 4 weeks of
getting to know J2EE). A good starting point will be the commented dtds of
orion with the spec(s) at hand. this is absolutely crucial to being able to
get the maximum out of the flexibility of J2EE (and orion) deployment.
something many people don't seem to know is, what's defined by the spec and
what's left to the J2EE vendor.
hope this helps somewhat,
robert
>Each time you deploy. I **MUST** be doing something wrong here. This can't
>be right. Has anybody done anything similar in the past? I've read just
>about every damn book on this and scoured the web to no avail. Either I'm as
>dim as a box full of broken light globes, or I'm in overload (I didn't know
>J2EE from a bar of soap 4 weeks ago), or I'm not getting something
>fundamental that everybody else seems to take a-priori.
>
>Help! Arggghhhhhhhhh...
>
>Kimbo
>Senior Web Developer
>Peakhour Pty Ltd
>http://smartoffice.com.au
>http://peakhour.com.au
>http://www.geocities.com/kimmie_scott
>
>
(-) 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