From: Grover Blue <grover.blue_at_gmail.com>
Date: Thu, 14 Aug 2008 13:38:18 -0500
I tried posting in various forums/listing, but I have yet to get a
response. Perhaps someone on this list can help me, and I'd really
appreciate it.
I have an application (AppAdmin.war) that I
deployed twice to Glassfish. After deployment, I changed the
persistence unit information for one of them so it would point to a
different database. It did not work, however, and the second
deployment still connects to the wrong DB. Below is what I did:
First deployment:
Application name: AppAdmin_Test
Application root: AppAdmin_Test
Second deployment:
Application name: AppAdmin_Prod
Application root: AppAdmin_Prod
After deployment, I modified two files for AppAdmin_Prod
AppAdmin_Prod\WEB-INF\classes\META-INF\persistence.xml
AppAdmin_Prod\WEB-INF\sun-web.xml
The only change I made in sun-web.xml was the context-root (since it was
still showing as AppAdmin_Test - does this even matter post deployment?):
<context-root>/AppAdmin_Prod</context-root>
I then restarted the Sun App server, but the persistence unit being used by
application AppAdmin_Prod still appears to be using jdbc/AppAdmin_Test.
What am I missing?
Thanks.
--
Government big enough to supply everything...is big enough to take
everything you have. The course of history shows that as a government grows,
liberty decreases --- Thomas Jefferson
www.CampaignForLiberty.org