Hi, I'm using JBOSS and EJB3 with Hibernate Annotations. All the time I worked with the EntityManager and it works fine. But now we have much more complex queries and I need to have a SessionFactory.
I added the Session Factory to the persistence.xml like this (also i tried it in the hibernate.cfg.xml) but he always brings up this:
Quote:
javax.naming.NameNotFoundException: managedEntityFactory.fidsdbsession not bound
All the mapping I do in the code is with Annotations. So there are no mapping XMLs.
Here is my persitence.xml
Code:
xml version="1.0" encoding="UTF-8"?>
<entity-manager>
<name>fidsdbmanager</name>
<jta-data-source>java:/OracleDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="select"/>
<property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook" />
<property name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache" />
</properties>
</entity-manager>
<session-factory>
<name>fidsdbsession</name>
<jta-data-source>java:/OracleDS</jta-data-source>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="select"/>
<property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook" />
<property name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache" />
<!-- Mapping files -->
<mapping package="com.airit.fidsdb.entity">
<mapping class="com.airit.fidsdb.entity.*">
</session-factory>
Please... Someone out there... HELP me :-)
At least to find a good documentation for that stuff...