users@glassfish.java.net

Obtaining The DB Location

From: <forums_at_java.net>
Date: Mon, 4 Jul 2011 18:24:52 -0500 (CDT)

Does Glassfish have an API where some queries can be made in regard to the
server's configuration? I have a situation where the Glassfish app server
that has been setup will only work properly on a Linux server. If Glassfish
is installed (and configured) on on Windows server then the developed
application will break. In the application it is accessing the DB using a
JDBC connection pool via JPA.

Every now and again when a change is made to the application the JPA layer on
Glassfish will spit out bizzare errors without a clear explaination that
makes sense. Incremental deployment to Glassfish is used. The only way to fix
these problems is to manually undeploy the app, and do a complete restart of
the server before deploying the app again (always works without problems).

When the mentioned problems occur there is a need to manually shutdown the
DB, otherwise connection problems will occur (with the lock files).
Unfortunately that requires doing manual JDBC calls which isn't ideal since a
hardwired DB location is required, hence the difficult situation that arises
with platform portability.

Below are the following technologies that are used:

  * Glassfish 3.1
  * Derby (version used on Glassfish)
  * Java 6 (Update 24)
  * EclipseLink JPA provider (version used on Glassfish)


--
[Message sent by forum member 'digi_pixel']
View Post: http://forums.java.net/node/818697