Hi, There is no built-in way to configure a shared QueryCompilationCache, but you could definitely implement such a thing. Probably the easiest way to do this would be to create a new type that implements Map (or, ideally, java.util.concurrent.ConcurrentHashMap) that routes get() and put() calls to a static singleton instance.
Do you use a lot of different queries, or a fairly predefined set? If it' a small set, you could use the new MetaDataCacheMaintenance class to pre-build a serialized dump of the MetaDataRepository, which includes compiled queries. -Patrick On Mon, Mar 31, 2008 at 6:52 PM, roger.keays <[EMAIL PROTECTED]> wrote: > > Hi all, > > Does anybody know if it is possible to configure OpenJPA EntityManagers to > use a specific database schema. ATM I'm using openjpa.jdbc.Schema, but this > only allows configuring the schema on EntityManagerFactories. > > Alternatively, is it possible to configure a shared QueryCompilationCache > across multiple EntityManagerFactories? > > Thanks in advance, > > Roger > -- > View this message in context: > http://www.nabble.com/Different-schema-per-entity-manager--tp16405560p16405560.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > > -- Patrick Linskey 202 669 5907
