After playing with it I agree with you. Actually on my new domain the sun-resources.xml never made it to the jar file so never got to the server to be included. I ended up setting up the db by hand. This is a little strange since the first domain I thought it did it for me. I could be mistaken though I slept once or twice since then.
---
Dru Devore
The best Christian community now online.
The Faith Haven
www.thefaithhaven.com
Come join us, bookmark us, and enjoy!
-------- Original Message --------
Subject: Re: Best Practice for deployment
From: Mitesh Meswani <Mitesh.Meswani@Sun.COM>
Date: Wed, July 09, 2008 1:07 pm
To: persistence@glassfish.dev.java.net
I think sun-resources.xml is a tool for better developer experience.
Manually managing resources is the best way to go for production or more
complicated scenarios.
Dru Devore wrote:
> Sorry yes I can.
>
> I am creating an application that I am testing on the same server as
> the development server. To accomplish this the database cannot be the
> same. I am creating a second database, again on the same DB server as
> the development testing. In creating the application NB created a
> sun-resources.xml which was wonderful because I didn't have to worry
> about setting up any db resources on the server. But if I simply
> deploy this to my second domain, where it needs to access another
> database, it will still access the original database server. I can
> comment out the DB information in the sun-resources.xml file and
> manually setup/change the db information but I wanted to know if this
> is still the way to do things or is there a better JPA method of doing
> this. I am guessing the manual management of the database settings in
> the server is still the best way to proceed.
>
>
> ---
> Dru Devore
> The best Christian community now online.
> The Faith Haven
> www.thefaithhaven.com <http://www.thefaithhaven.com>
> Come join us, bookmark us, and enjoy!
>
> -------- Original Message --------
> Subject: Re: Best Practice for deployment
> From: Mitesh Meswani <Mitesh.Meswani@Sun.COM>
> Date: Tue, July 08, 2008 7:03 pm
> To: persistence@glassfish.dev.java.net
> <mailto:persistence@glassfish.dev.java.net>
>
> Can you please provide some more details. What do you mean by
> "where the
> persistence destination is different"
>
>
> Dru Devore wrote:
> > I am starting to deploy a JPA project to different servers,
> where the
> > persistence destination is different, and need some advice. I
> > currently have the persistence.xml correct and see the
> > sun-resources.xml actually contains the pool and connection
> > information for glassfish. If I comment out the pool and
> resources I
> > can change the pool in the server and all is right with the
> world. My
> > question is: Is this the best way to handle it, I remember that
> this
> > is basically the way I did it on the last project I started with DB
> > access though it was a few years ago. Anyway I am using NB and
> > Glassfish and just wanted to make sure there wasn't a better JPA
> > method of doing it.
> >
> > ---
> > Dru Devore
> > The best Christian community now online.
> > The Faith Haven
> > www.thefaithhaven.com <http://www.thefaithhaven.com>
> <http://www.thefaithhaven.com>
> > Come join us, bookmark us, and enjoy!
>