Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Dali, Toplink (GlassFish) and DB2
Dali, Toplink (GlassFish) and DB2 [message #581903] Sat, 15 April 2006 21:02 Go to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member


This topic is a little bit off-topic but I hope to get an answer from
the Dali/Toplink people here. ;)

I'm using Dali and generated some entities from existing tables. It's a
DB2 database. The problem is that I don't know how to set the DB2 schema
at runtime. When creating the connection in Eclipse Dali allowed to to
select a database schema (other than the default that belongs to the
user). However, I'm not aware of such an option in the persistence.xml
using GlassFish/Toplink.

The problem is probably because DB2 uses the user's schema as the
default schema. However the entity exists in a different schema on the
same db. Thus, a simple "select object(o) from Entity o" fails because
GlassFish is using the wrong schema.

I know that there is a property in Hibernate "hibernate.default_schema".
But I haven't found something similar in GlassFish.

Any ideas?

Thanks, Gunnar

Gunnar Wagenknecht
Re: Dali, Toplink (GlassFish) and DB2 [message #716782 is a reply to message #581903] Thu, 18 August 2011 13:13 Go to previous messageGo to next message
Ali Manji is currently offline Ali ManjiFriend
Messages: 1
Registered: August 2011
Junior Member
Hi Gunnar - did you ever resolve this issue?
Re: Dali, Toplink (GlassFish) and DB2 [message #720056 is a reply to message #716782] Mon, 29 August 2011 18:43 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
The standard JPA solution to setting a default schema for your persistence unit is to configure the schema setting in the persistence-unit-defaults. This is defined in 1 and only 1 XML Mapping file (orm.xml) as follows:

<entity-mappings ...>


Previous Topic:persistence.xml management
Next Topic:Dali M2 build now available
Goto Forum:

Current Time: Sat May 26 12:22:29 GMT 2018

Powered by FUDForum. Page generated in 0.01284 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top