sessionFactory « Map « JPA Q&A





1. Runtime one-way mapping of n tables to 1 class in Hibernate    stackoverflow.com

I have data in different tables but in the same database, all of which have the same schema. Depending on some runtime variable, I want to choose which table to use ...

2. Is it possible to use several databases with one SessionFactory in Hibernate 3 with XML?    stackoverflow.com

for example can I use catalog attribute or schema for it?
Now I use several databases and several sessionfactories but I would like to create relationships between these databases ...

3. Adding mappings to an existing SessionFactory    forum.hibernate.org

4. Addind mapping to sessionFactory    forum.hibernate.org

This is the situation: I have a J2EE application, when there is the first call to Hibernate I build a configuration object, from which I build a sessionFactory object which I store in JNDI ... this first step maps all the classes (and of course is quite slow) On the second call I get my session factory from JNDI ... and ...

5. Strange problem creating Session Factory and mappings    forum.hibernate.org

Author Message pliniomarcos Post subject: Strange problem creating Session Factory and mappings Posted: Thu May 05, 2005 11:07 am Newbie Joined: Thu May 05, 2005 10:48 am Posts: 4 Sorry if it's a stupid error but I'm working with Hibernate 3.0 and I'm loving the developing beneficts my company had developing web applications with Hibernate. But with a particular ...

6. Is it possible to add new mapping to existing SessionFactory    forum.hibernate.org

Hi, Is it possible to add new persistent classes to an existing SessionFactory? I know you can use the Configuration class to dynamically add mapping files before you create the SessionFactory, but once the SessionFactory is created, is it possible to add new mapping? In our case, we have some persistent classes which our user may develop and we will load ...

7. Class mapping across multiple SessionFactory instances    forum.hibernate.org

Hi all. I'm a bit of a newb to Hibernate and really like what Im finding. However, Ive got a bit stuck on the following issue using Hibernate 3.1. I have two configuration files each initialised with their own SessionFactory (due to their being 2 separate databases). One .cfg is mapped to our static data database and has an object called ...

8. Multiple SessionFactories mapping the same tables in one app    forum.hibernate.org

I've recently joined a fairly big new project which has an unusual architecture of having a seperate SessionFactory for each module of the project. All the modules are deployed together in a single WAR file. There is also a common module with a number of hibernate mappings, that is included in each other modules hibernate mappings. I can understand multiple session ...

9. Mapping objects with 2 disparate sessionfactories as source    forum.hibernate.org

I'd like to map an object that is made up of two separate entities from two separate databases on two separate servers. I ran into a "mapping does not not exist" error (or something like it) when I tried a straightforward approach and being generally lazy I figured I'd post the question here for you all. Any ideas?





10. How to add mapping files to SessionFactory after created?    forum.hibernate.org

In my project ,we want to empower users to create their own object from our application UI, I know we can use hibernate tools to generate java files, mapping files and even the table in database. My question is how can I dynamic add these mapping files to SessionFactory after it has been created in runtime without recreated the SessionFactory?

11. Does SessionFactory.close() release mappings?    forum.hibernate.org

12. Initial SessionFactory fails because of Mapping file    forum.hibernate.org

hi, i'm trying to set up a simple hibernate application, where i have two tables in my database, represented by two POJOs (Group.java and Story.java). I am using PostgreSQL as my database. My problem is that I am getting the following exception when this line of code executes: sessionFactory = new Configuration().configure().buildSessionFactory(); Initial SessionFactory creation failed.org.hibernate.InvalidMappingException: Could not parse mapping document ...

13. Error Creating SessionFactory-Could not parse mapping doc.    forum.hibernate.org

Newbie Joined: Tue Feb 19, 2008 5:17 am Posts: 5 Location: Hyderabad Hi , I am doing a web application using spring and Hibernate using jboss server. I am using Hibernate3.0 and db server is MySql5. I am getting the following exception while connecting to database. Here is the log. ###########Exception############ Feb 19, 2008 2:34:04 PM org.hibernate.cfg.Configuration configure INFO: configuring from ...

14. one to many mapping - different session factory    forum.hibernate.org