-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Here is my persistence.xml
PostPosted: Mon Apr 03, 2006 2:50 am 
Newbie

Joined: Mon Apr 03, 2006 2:47 am
Posts: 1
Here is my persistence.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence>
   <persistence-unit name="ebEntityManager" transaction-type="RESOURCE_LOCAL">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
         <class>com.jl.eb.dao.Category</class>
      <class>com.jl.eb.dao.CategoryItem</class>
      <class>com.jl.eb.dao.Base</class>
      <class>com.jl.eb.dao.CategorySpec</class>
      <class>com.jl.eb.dao.CommonCode</class>
      <class>com.jl.eb.dao.Cycle</class>
      <class>com.jl.eb.dao.Field</class>
      <class>com.jl.eb.dao.FieldValue</class>
      <class>com.jl.eb.dao.Rule</class>
      <class>com.jl.eb.dao.SpecSelect</class>
      <properties>
          <property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect" />
          <property name="hibernate.connection.driver_class" value="com.ibm.db2.jcc.DB2Driver" />
          <property name="hibernate.connection.password" value="world" />
          <property name="hibernate.connection.url" value="jdbc:db2://localhost:50000/hello" />
          <property name="hibernate.connection.username" value="db2admin" />
          <property name="hibernate.ejb.autodetection" value="none" />
          <property name="hibernate.max_fetch_depth" value="3"/>         
    </properties>
   </persistence-unit>
</persistence>

my question is if I delete the class list,It also could find all of classes with '@Entity' annotation, even there is no class in the list.
Is it right?
If I have two or more EntityManager in my application.How it could work good for each other?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 03, 2006 5:27 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You also need to remove the hibernate.ejb.autodetection overriding to make it work.

The idea behind autodetection is to put the entities of a given Persistence Unit in the same jar and add the persistence.xml in it. So having 2 PUs usually means having 2 jars.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.